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 shop'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 core's automatic pick of the first-in lot can override the proposal until POS LANE X row X57 merges; test that shape first.
- 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 (testing and release).
- 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
- A coded reason when a cashier voids, returns or discounts — Ready, with limits (3)
- Insurance co-payment: the insurer pays part of a prescription and the customer the rest — Not yet
- Keep each customer's prescriptions in iVendNext — Ready
- Keep the controlled-drug register the law asks for — Not yet
Start a project shortlist with this need · Put it in your blueprint · Every need