Wastage Log
Wastage Log records every item you throw away or write off — expired, unsold at end of day, damaged, or failed quality — with a running monthly write-off cost so you can see exactly how much spoilage is costing the bakery.
Overview
Every entry records a Product (searched live from your product catalogue), an optional Batch (shown automatically once a product with tracked batches is selected), Qty Wasted, Cost per Unit, Reason, Date and Notes.
This shared component (exported as FnbWastageLogPage from pos-react-lib) is used across food-service variants but is mounted here as the bakery's dedicated wastage log at /bakery/wastage.
The page can also open pre-filled — for example, another bakery page can hand off product and batch details directly into the Add Wastage form via router navigation state, so the form opens automatically with those details ready.
Before You Start
- No plan-tier restriction. The product being wasted must already exist in the product catalogue to be selected via search, though the product name is always saved as free text regardless.
Step-by-Step Guide
1 Log a wastage entry
- Click Log Wastage (or the form opens automatically when arriving here with a pre-fill, e.g. from another bakery page).
- Search and select the Product.
- If that product has tracked batches, pick the specific Batch — this auto-fills its remaining quantity and cost price, and shows the batch's expiry date in the option list.
- Enter Qty Wasted and Cost / Unit (auto-filled from the product or batch where available, but editable) — a running Total write-off amount appears live as you type.
- Choose a Reason: Expired, Unsold / End of Day, Damaged, Quality Fail, or Other.
- Confirm or change the Date (defaults to today) and add optional Notes.
- Click Log Wastage.
2 Review this month's write-off total
- The This Month's Write-off tile at the top always reflects the current calendar month's total cost, independent of whatever date filter is currently applied to the table below.
3 Filter the wastage table
- Use the From / To date pickers to narrow the list to a specific range.
- Use the Reason dropdown to isolate one cause, e.g. only Expired entries.
- Click Clear filters to reset — the Entries Shown tile always updates to match the current filtered count.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Log Wastage | Opens the Add Wastage form. |
This Month's Write-off tile | Total cost of all wastage entries recorded in the current calendar month, regardless of table filters. |
Entries Shown tile | Count of rows currently visible in the table after any From/To/Reason filters. |
From / To date filters | Narrows the wastage table to a specific date range. |
Reason filter | Narrows the table to one wastage reason. |
Clear filters | Resets From, To and Reason back to blank. |
Date / Product / Batch / Qty / Reason / Cost Write-off / Notes / By columns | The wastage table. |
Product * | Searched live from the product catalogue in the Add Wastage form. |
Batch | Optional; only shown when the selected product has tracked batches, and auto-fills cost and shows expiry. |
Qty Wasted * | The quantity being written off. |
Cost / Unit | Per-unit cost used to calculate the total write-off; editable even when auto-filled. |
Total write-off | Live preview of Qty Wasted × Cost / Unit as you type. |
Reason * | Expired, Unsold / End of Day, Damaged, Quality Fail, or Other. |
Date * | Defaults to today; the date the wastage is recorded against. |
Notes | Optional free-text detail about the entry. |
Tips & Best Practices
- Log unsold end-of-day items every closing shift rather than batching it up weekly — same-day entries keep the batch/expiry link accurate and the monthly total meaningful in real time.
- Pick the specific Batch whenever one exists — it keeps Cost per Unit accurate to what that batch actually cost, rather than the product's generic current cost price.
- Use the Reason filter monthly to spot patterns — a spike in "Unsold / End of Day" for one item usually means you are over-producing it relative to demand; check Demand Forecast on the Production Schedule page.
- Cross-check this log against Expiry Monitor before writing something off as Expired — if it still has a few days left, a clearance discount may recover a sale instead of a full write-off.
Troubleshooting & FAQ
The Batch dropdown isn't showing for a product I know has batches.
Cost per Unit came out to 0 for a wastage entry.
This Month's Write-off tile doesn't match the sum of what I see in the table.
I was dropped straight into an open Add Wastage form when I opened this page.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/fnb/WastageLogPage.jsx
Backend endpoints used:
GET /bakery/wastagePOST /bakery/wastageGET /productsGET /inventory/:productId/batches
Related tables (db-core repositories):
BakeryWastageProductStockBatch
Redux slices:
None — local component state; reads router location.state for an optional pre-fill payload
Feature flag key: wastage_log
Exported as FnbWastageLogPage from pos-react-lib — shared across food-service variants. Logging a wastage entry here does not itself deduct product stock; it is a cost and reason ledger. Actual stock deduction for wasted or expired batches happens separately, through whichever flow initiated the write-off (e.g. Inventory's Waste/Loss action).