# Inventory valuation readiness ## Evidence | Data | Current representation | Limitation for valuation | |---|---|---| | On-hand quantity | `stocks` by product/warehouse | Current balance is not historical quantity by effective date. | | Movement history | `stock_movements`: type, quantity, before/after, ref, timestamp | No unit/extended cost or layer reference. GR does not guarantee a movement for every receipt path. | | Product cost | Mutable `products.purchase_price` | Current stock-value reports multiply current quantity by current cost; product edits can change historical report values. | | PO cost | `purchase_order_items.unit_price`, discount, ordered/received qty | No immutable received cost, landed-cost distribution, or guaranteed audit of later PO edits. | | Receipt | `goods_receipt_items` quantity and PO-item reference | No dated cost layer or frozen received unit cost. Current GR stock update is raw quantity addition. | | Sale lines | Immutable selling price/discount snapshots | No cost snapshot or cost-layer consumption/HPP value at sale. | | Return lines | Return quantity and selling-price-derived refund | No original inventory cost to restore or write off. | | Opname | System/physical quantity and difference | No persisted, approved valuation basis for the adjustment amount. | ## Readiness conclusion - **FIFO:** not implementable reliably from existing history; layers and sale consumption links are absent. - **Moving weighted average:** not implementable reliably; no complete dated value/quantity ledger, revaluation logic, or backdated recalculation exists. - **Historical reconstruction:** unsafe from current `purchase_price`; that mutable field is not an immutable transaction-cost source. - **Inventory-to-GL reconciliation:** unavailable because there is no complete cost-bearing movement ledger and no per-movement GL posting trail. ## Safe cutover prerequisites 1. Owner/controller approves FIFO or moving weighted average and effective-date, rounding, backdating, negative-stock, return, landed cost, tax and price-variance rules. 2. Freeze/snapshot current quantities by product/warehouse at a cutoff; obtain an approved physical count and approved opening unit-cost basis with supporting evidence and approver. 3. Do not invent historical layers from current product prices. Keep legacy history as unreconstructed; opening value is a separately approved cutover balance, not a claim about past HPP. 4. Prospectively persist immutable receipt cost events, cost-layer/balance state, sale consumption, return restoration/write-off, adjustment value, source IDs, effective/posting dates, actor and reversal linkage. 5. Post inventory/COGS effects from cost events atomically or through a durable uniquely keyed outbox. 6. Build read-only quantity/value/GL reconciliation that exposes variances and source references; never auto-post a balancing plug. ## Decisions awaiting approval Cost method; authoritative PO vs supplier-invoice/landed cost; freight/discount/tax allocation; backdated cost recomputation versus current-period adjustment; negative inventory; returned layer cost; damaged/quarantined disposition; opening balance/count evidence; GL account mapping; cutover date.