This folder documents the product's domain surface, centered on the stock/inventory
accounting system — the perpetual ledger, scope axes, units, item policies,
costing, recipes/production, procurement, sales-consumption, period close,
fixed assets, the financial boundary, and the food-attribute layer (nutrition ·
shelf-life · allergens) — plus the menu/catalog reference-data surface and the
labor domain (shifts · timesheets · payroll · prime cost).
The append-only double-entry stock-move journal that is the spine of the system — every receipt/sale/transfer/waste/count/production is one immutable location-to-location move; on-hand is derived, never stored.
The four orthogonal attribution axes — Company, Warehouse (the accounting contour where valuation, count and close sit together), Restaurant (P&L grain), Channel — why valuation strategy is chosen by how many warehouses a business creates rather than by a setting, the storage locations inside a warehouse whose quantities are counted one location at a time while value stays on the warehouse, and the warehouse↔restaurant consumes-from/supplies relation that lets a shared commissary supply restaurants by explicit transfer.
The single measure-conversion model gated by physical dimension, with company-shared standards, per-item measures, the supplier-free bundle unit you buy in (a per-item unit with a barcode), and convert-to-base at the posting edge (no cross-dimension density conversion).
How an item's behavior (counted/valued, acquisition, recipe-capable, cost bucketing) routes off stable enumerated policy fields — never off category name, id, or "kind."
Moving-average cost (live perpetual + period-close authoritative), the landed-cost waterfall, line-level region tax (US sales-tax vs EU recoverable VAT), and owed-vs-worth on every receipt.
The financial boundary — what the stock domain hands to the books: the fixed set of conceptual accounts (inventory value, food/packaging COGS, shrinkage, price-difference, input-VAT receivable, expense-on-receipt, depreciation, gain/loss on disposal) exported to the operator's accounting package.
The F&B layer above the generic engine — immutable-by-reference recipe versioning (with backdated activation), bill-of-materials explosion of a sale to its raw materials, prep-item production posted at operator-confirmed actuals with emergent (not typed-in) yield, the production floor a batch draws its inputs from, and the recipe correction that fixes wrong-recipe journals without touching history.
Nutrition, allergens, and shelf-life as food attributes that roll up the recipe tree (one walk → four answers → one refresh), the two-stage shelf-life advisor, leaf profiles sourced by barcode/label/public food database, and the single lot-expiry → FEFO → expiry-write-off seam into the ledger.
The arithmetic of cooked nutrition — one formula (nutrients entered ÷ weighed output), why un-listed water dilutes for free, why evaporation concentrates without taking nutrients, the consumed-mass cases where nutrients do leave (drained brine, absorbed oil, pasta-water salt), worked batch end to end.
The pre-ledger intent domain — the purchase order, suppliers and the supplier articles that price an item in a chosen unit, per-(item × warehouse) min/max par levels, the invoice-optional (and supplier-optional) goods receipt, the three-way match, and the stock-aware procurement plan.
How an externally-produced sale becomes a stock fact — the one-way sales boundary, idempotent sales-ticket ingest, dish-explode vs. direct-item lines, station-based consumption routing, the €0 comp, internal consumption and its per-company categories, restatement, and unmapped-name quarantine.
Period close — the count as a pure observation covering quantities, implements and asset serials, the close policy as a cadence hint rather than a gate, posting differences as the reconciler's own gesture, the earliest-on-or-after closing count, the opening count that starts a warehouse's stock-keeping (with the priced receipt, the one cost door; what it leaves off, it asserts as zero), closing-WAC re-spread into COGS, the balance self-check, deterministic blockers, and the restaurant P&L roll-up.
Fixed-asset (PP&E) accounting in a separate slim sub-ledger via the capitalize-and-depreciate treatment for durable assets — an asset register of what the company owns, fed by ordinary goods receipts, the separate decision of whose books carry each unit (and the owned-but-unplaced unit that no count and no close asks after), straight-line depreciation, disposal, the dated transfer that moves a unit between warehouses, the serial confirmation on that warehouse's count and the unconfirmed-serial close blocker, and why a fixed asset is not inventory.
Worked time as cost — shifts, weekly timesheet approval, effective-dated pay, the gross-only payroll run, prime cost (food + labor) as the headline figure, and the single absorption seam where a production day's direct labor enters the value of the prep items it made (and why indirect labor never spreads to dishes).
The non-negotiable rules of the stock/inventory domain in one quick-reference contract — each with a one-line WHY and a worked example; if a change violates one, the change is wrong.