Your supplier emails: from the next container, the mugs cost fifty cents more. Did your margin change today? If your system keeps one cost per product — last cost — the answer is yes, instantly, on stock you bought months ago at the old price. That's a lie. It lies the other way too, when prices fall, which is how shopkeepers end up panic-discounting product that never actually got more expensive.
Receipts become layers
In OrderOps, every stock receipt records a quantity and a landed cost per unit, and becomes a cost layer. Layers queue oldest-first by the date you received them. Your shelf is now a stack of priced batches instead of one number that gets overwritten every time a supplier reprices.
Orders eat the oldest layer first
When an order ships, its units come off the oldest active layer, and that allocation is recorded against the order line. When a layer runs out, it's marked depleted and the next one takes over. The cost of an order is the sum of what it actually consumed — not whatever the cost field happened to say that week.
SKU MUG-BLK
layer 1 recv 02 Mar 100 @ $4.00 80 left ← selling from here
layer 2 recv 28 May 100 @ $6.00 100 left
order: 3 units
COGS = 3 × $4.00 = $12.00 (layer 1 → 77 left)
margin moves when layer 1 empties — not when the email arrivesThe reports are built on those allocations: per SKU you get units sold, revenue, COGS, margin and margin percent, over 24 hours, 7, 30 or 90 days, or all time. Receive against purchase orders and each layer traces back to the supplier order that created it — ordered versus received, draft through to closed. The full mechanics are in the cost layers doc.
One limitation worth knowing before you lean on the numbers: costs are allocated at the moment of sale. If you fat-finger a landed cost on Tuesday and correct it on Friday, the orders shipped in between keep the COGS they were sold with — there's no retroactive reprice of history. The audit trail shows every cost change, but margin history reflects what the system knew at the time. Enter receipts carefully; the layers remember.