Hacker News new | ask | show | jobs
by rest4thewicked 1406 days ago
It depends on the accounting treatment that you need to track under. Average cost is easier to track with a Ledger type solution.

You keep track of inventory in two ways on two different Ledger Accounts under different "currencies." Inventory in dollars and inventory in units.

When you make a sale calculate average per unit value by dividing inventory USD value by number of units. Then your COGS value is driven by that average * units.

Each purchase adds to both the USD and the units accounts.