First in first out problem

Hello.
I am facing such an error, please look into it and solve it soon.
The user buys goods based on an order and sells the goods directly to the customer.
The goods the user buys come with different cost prices depending on the costs. He sequentially creates a purchase transaction first and then a sales transaction. Although we show the goods he buys and sells in the first-in, first-out calculation, the system first loads the purchase invoices into the system. Based on the purchase invoices, it creates an average value by quantity and then calculates the cost of sales with this average value.
In the end, although the total cost values ​​are correct, the cost of the sales invoice shows an incorrect value. The sequence of purchases and sales is broken. Please look into this problem.

You need to explain your issue with screenshots. Is this some kind of Dropshipping you are dealing with? In which you have done a purchase for a specific customer and directly delivered it to the customer. So you want cost of that purchase to be allocated to that particular sale?

Yeah, like that. I’ll write an example. I bought an apple 300 kg, for the price of 20 cents. And I sold it for 80 cents . Then I bought a 200 kg apple again for 22 cents and immediately sold it for 80 cents. Despite my steps, the systems automatically buy apples first, 300x20 + 200x22. The automatic sets the price per kg 20.8. And the cost of each sale is 300x20.8 and 200x20.8. And before buying 200 kg, I was empty

You want FIFO and i think that is not working currently. Right now Weighted Average is the only working method.

2 Likes

Yes, I need FIFO, but at least the purchase and sales invoices should follow each other correctly over time. In transactions on the same day, purchases and sales should not be separated, the goods and materials should be removed from the warehouse in the same order, and the cost of sales should be calculated at the price that was in the warehouse at that time.
Please pay attention to this @lubos

1 Like