moving average cost calculation

From the ax white paper example,

We receipt 2 item and sell 1 item.

After that we post invoice for the receipt, the invoice will include the selling item for sure.

What if we have another scenario, we have another receipt

Oct, 2 receipt 1

Oct, 3 receipt 2

Oct, 5 sell -1

How can we know what is the item that we sell ? Is it FIFO ?

Hi Phongsathorn

In your example of two receipts before the first sale, the cost attached to the sale will be the average cost of the 3. So if receipt 1 also has a cost of 10, the cost on the sale will be 10. But if receipt 1 has a cost of, for example, 20 then the cost on the sale will be 13.33 (40/3 = 13.33).