Depletion from the recipe
A closed sale takes each ingredient out of stock using the dish’s recipe card and posts the cost of sales.
src/lib/subscribers.ts:120 inventory.deplete · src/routes/inventory.ts:584Every dish is a recipe. When an order closes, the recipe takes its ingredients out of stock at their weighted average cost, and the receipts that fed the shelf are in the same books.
Demo dataA closed sale takes each ingredient out of stock using the dish’s recipe card and posts the cost of sales.
src/lib/subscribers.ts:120 inventory.deplete · src/routes/inventory.ts:584Cost is recalculated on receipt from what was paid, so the value of the shelf follows the invoices.
src/lib/stock.ts:187-209Confirming a goods receipt moves the accepted lines into stock and posts the value to the ledger. A delivery line can carry a batch number and an expiry date.
src/routes/purchases.ts:1030 · src/lib/subscribers.ts:1149 · :884A scanned supplier invoice is matched against the order and the receipt before it becomes a bill to pay.
src/routes/purchases.ts:1197-1222Stock counts, a waste log and transfers between locations are tabs of the same screen.
public/static/pages/inventory.jsEach item has a minimum and a maximum, and an Alerts tab lists what has fallen short.
public/static/pages/inventory.js · src/lib/reorder-rules.ts