We have improved the handling of warehouse documents by adding support for FIFO queue along with generating a margin report based on it.
You can enable the FIFO option by going to Settings> Account settings> Configuration> Warehouses> Products dispense order
FIFO is a method of valuing products in stock and their disbursement, which involves accounting the disbursement starting from goods that were received into the warehouse the earliest. It is also a general rule under which the goods that have been stored in the warehouse the longest are released first.
You can read more about the FIFO method on our blog.