First-expiry-first-out at the till
The customer asks: The till sells the batch that expires first
- Verdict: Ready, with limits (5)
- Door: Configure · area: Stock and buying › Batches and expiry
- Recipe: none yet
- Sample: none yet
- Checked: carried 2026-10-16 · not re-run (read in the product's
serial_batch.pylist_lotsat POS origin/development 3a2335e0a; not walked on a till)
What you build
Nothing of yours: switch batch tracking on for the item (card batches-and-expiry). At the batch pick the till lists the item's lots with the earliest expiry first, lots with no expiry last and empty lots at the bottom, and proposes the earliest-expiry lot or lots for the quantity, splitting across lots when one is short for a line in the stock unit (list_lots, business_logic/serial_batch.py).
Limits
- The cashier confirms the pick: a proposal, not an assignment. The server checks the pick again at checkout and refuses one that does not add up to the quantity.
- A line sold in a pack unit takes one lot for the whole line: the earliest lot that holds it, or none.
- The order is by expiry date alone. It does not follow the retailer's Stock Settings choice of first-in or first-expiry; a till that assigns lots by itself in that order is a product decision, not a door (ask us if the customer needs it).
- For an item that has both batches and serial numbers, the till books each unit with the batch its serial number carries.
- Offline, a batch line is added without a pick (read in the till's code, not walked).
Tell the customer
At the batch pick the till suggests the lot that expires first, and the cashier confirms it.
What next
- Tell the customer the 5 limits above, and write them into the proposal.
- Read how the door works: 4. Configure first.
- Build and test it on your sandbox (request one if you have none; what is on it).
- Check it on your sandbox as the people who will use it; where it touches a price or a total, the money kit's release gate proves it (the release gate).
- Make the same settings on the customer's site, from the list you wrote down, through the customer's own change process.
Nothing to code: write down each setting you make on your sandbox, so it is made the same way on the customer's site.
Related needs
- Block a recalled batch at every till and store at once, find its stock and the customers it reached, dispose of it with the regulator's visit recorded, and refuse short-dated deliveries — Ready, with limits (7)
- Each pack carries its own printed code; check it when stock is received, moved, counted and sold, and tell a lost pack from a sold one — Ready, with limits (9)
- Read a pharmacy pack's 2D code at the scan, and refuse an expired pack — Ready, with limits (2)
- Refuse a batch whose remaining shelf life is below our minimum, unless a named role accepts it — Ready, with limits (4)
Start a project shortlist with this need · Put it in your blueprint · Every need