Skip to content

The inventory ledger

The inventory ledger is the audit trail. Stock movements, planning projections, disposition moves, and cost-only changes are appended as events; projected balance tables make those events fast to read.

append-onlyidempotent writesfilterable

Field groupHolds
WhereOrganization, location, item, and optional lot.
What changedEvent type, positive quantity, unit cost, extended cost, and disposition fields.
WhyReference type/id, parent event, event subtype, adjustment reason, and notes metadata.
Who and whenActor, occurred timestamp, and idempotency key.

Stock event quantities are positive; the event type determines whether the movement increases or decreases stock. Cost-only events use quantity 0. Demand and expected-supply events have no lot or cost.

  1. Filter to the surface you care about. The app supports filters for event type, movement class, item, document type/id, actor, occurrence date, lot, and text.
  2. Read the source/cause. Purchase receipts, sales consumption, manufacturing events, stocktakes, transfers, and adjustments link back to the source where the code can resolve one.
  3. Compare before and after. On-hand event rows show signed movement and on-hand before/after when the ledger can calculate it.
  4. Use cost fields for valuation history. Stock events carry unit and extended cost. Revaluation events show cost-only changes.
ProjectionGrainHolds
inventory_lot_balancesitem x location x lot x dispositionQuantity, unit cost, received date, origin event, active flag.
inventory_item_balancesitem x locationOn hand, demand, expected, available to promise, last verified date.
inventory_expected_summaryitem x location x referenceRemaining expected supply by source document.
inventory_demands_summaryitem x location x referenceRemaining demand by source document.