Please suggest an option for Point No. 04
01. Invoice product which is out of stock.
02. Using Average Costing method
03. Posting invoice (but delivery is pending)
04. Once goods received, make the delivery and adjusting GL entries reference to the specific invoice posted before (Cost of Goods Sold account). Since purchasing prices may differ.