Home / Help Center / pos-app-bakery / bakery / Wastage Log
🗑️ bakery

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.

📍 Menu path: Bakery → Wastage Log
👤 Who uses it: All roles can view and log entries; no plan-tier restriction

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

Step-by-Step Guide

1 Log a wastage entry

  1. Click Log Wastage (or the form opens automatically when arriving here with a pre-fill, e.g. from another bakery page).
  2. Search and select the Product.
  3. 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.
  4. 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.
  5. Choose a Reason: Expired, Unsold / End of Day, Damaged, Quality Fail, or Other.
  6. Confirm or change the Date (defaults to today) and add optional Notes.
  7. Click Log Wastage.

2 Review this month's write-off total

  1. 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

  1. Use the From / To date pickers to narrow the list to a specific range.
  2. Use the Reason dropdown to isolate one cause, e.g. only Expired entries.
  3. Click Clear filters to reset — the Entries Shown tile always updates to match the current filtered count.

Every Field & Button, Explained

Field / ButtonWhat it does
Log WastageOpens the Add Wastage form.
This Month's Write-off tileTotal cost of all wastage entries recorded in the current calendar month, regardless of table filters.
Entries Shown tileCount of rows currently visible in the table after any From/To/Reason filters.
From / To date filtersNarrows the wastage table to a specific date range.
Reason filterNarrows the table to one wastage reason.
Clear filtersResets From, To and Reason back to blank.
Date / Product / Batch / Qty / Reason / Cost Write-off / Notes / By columnsThe wastage table.
Product *Searched live from the product catalogue in the Add Wastage form.
BatchOptional; only shown when the selected product has tracked batches, and auto-fills cost and shows expiry.
Qty Wasted *The quantity being written off.
Cost / UnitPer-unit cost used to calculate the total write-off; editable even when auto-filled.
Total write-offLive 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.
NotesOptional free-text detail about the entry.

Tips & Best Practices

Troubleshooting & FAQ

The Batch dropdown isn't showing for a product I know has batches.
Batches load only after a product is selected from the search picker — if you typed a product name without picking it from the dropdown, no product ID is attached and batches cannot be looked up.
Cost per Unit came out to 0 for a wastage entry.
Neither the product nor the selected batch had a cost price recorded. Enter the cost manually before saving so the write-off total is accurate.
This Month's Write-off tile doesn't match the sum of what I see in the table.
The tile is always the current calendar month total regardless of any From/To filter applied to the table — clear your date filters to see the same range the tile reflects.
I was dropped straight into an open Add Wastage form when I opened this page.
Another bakery page navigated here with a pre-filled product or batch. Close the form if you do not want to log it — nothing is saved until you submit.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/packages/pos-react-lib/src/pages/fnb/WastageLogPage.jsx

Backend endpoints used:

  • GET /bakery/wastage
  • POST /bakery/wastage
  • GET /products
  • GET /inventory/:productId/batches

Related tables (db-core repositories):

  • BakeryWastage
  • Product
  • StockBatch

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).