Free lesson · 9 minute read · Reseller Growth Systems
Capture COGS at the Moment of Sale
Preserve the actual cost attached to each sold unit so later inventory edits cannot rewrite profit history.
Your goal
Understand how sales should reduce inventory and snapshot cost basis.
When to use
Use whenever you record a sale, especially multi-item orders.
Why this matters
Historical profit becomes unreliable when sale records depend on live inventory values that can change later.
The lesson
When a sale happens, two things occur: revenue is created and inventory leaves the business.
The exact physical unit matters because its cost basis may differ from other units. At sale time, capture the unit cost into the sale record. That amount becomes cost of goods sold for that transaction.
Do not rely on looking up inventory cost months later. Inventory may be corrected, merged, repaired, or otherwise changed. Historical sale economics should remain stable.
For multi-item sales, capture cost per line. Sale price should also reflect the actual amount received for each line or a defensible allocation of the order total.
Inventory quantity/status should be updated only once. If a failed network request retries, you do not want the same sale deducting stock twice. Manual systems can prevent this with clear status checks; software uses idempotent operations and locks.
Refunds need the reverse logic: determine whether inventory actually returned and whether the cost should be restocked.
Worked example
Two identical MacBooks cost $900 and $1,020. You sell the $900 unit for $1,150. If the system simply averages inventory cost later, the transaction profit becomes distorted. The sale should snapshot $900 as that unit's COGS when sold.
Practical checklist
- Exact unit sold
- Actual sale price
- Cost snapshot
- Inventory deducted once
- Fees/shipping
- Payment status
- Refund reversal logic
Common mistakes
- Using average cost for unique used units
- Editing COGS after the sale
- Deducting inventory twice on retry
- Restocking refunded inventory that never returned
Key takeaways
- Sale and inventory movement are linked
- Historical COGS should be stable
- Exact unit identity preserves profit accuracy
Put this into practice
Review your last five sales and confirm each one can be linked to an exact cost basis.
Before you finish
Changing today's inventory record would not change yesterday's profit calculation.
Progress is saved on this device; no account required.