Megaventory calculates product costs based on the moving average costing method. The beginning inventory (product quantities) and cost of beginning inventory are set by the initial quantities process of the Inventory Taking module. With each purchase, the current unit cost of each product changes according to:



At any time, the last unit cost, along with the current quantity, is used to determine current inventory cost. The following example  helps illustrate how Megaventory deals with product costs & revenues when various documents are created:

For SKU: ABC123
Unit Sales Price: $50

Action
Inbound/Outbound 
quantity
Total 
Quantity

Costing 
Quantity *

Purchase Cost

per Unit ($)

Cost 
per Unit ($)

Revenue

per Unit ($)

Inventory taking

100 100 100 - 10 -

Goods Inbound &

Purchase Invoice #1

100 200 200 20 15 -
Goods Outbound 
& Sales Invoice #1
100 100 100 - 15 35
Goods Inbound #1 100 200 100 - 15 -
Purchase Invoice # 1 
(against Goods Inbound #1)

200 200 25 20 -
Goods Outbound 100 100 100 - 20 -
Sales Invoice # 1 
(against Goods Outbound # 1)

100 100 - 20 30
Goods Return from Client 
& Credit (against Sales Invoice #1)
100 200 200 - 20 -30 **
Goods Return to Supplier 
& Credit (against Purchase Invoice #1)
100 100 100 -25 *** 15 -



* - The costing quantity is adjusted only if an invoice or credit note is included in the row 

** - A credit to the Client is given at a unit price of $50 (full refund)

*** - A credit from the supplier is received at a unit price of $25 (full credit)