Batches and expiry dates
Tracking stock by batch (lot) number and expiry date: switching it on, recording batches on deliveries, first-expiry-first-out, expired and short-dated stock, writing it off, stock without a batch, recalls and printing batches on invoices.
Batch tracking records which batch (lot) every unit in stock belongs to, and its expiry date. Pharmacies, food and cosmetics businesses need it for three things: selling the oldest stock first, knowing what is about to expire, and finding who received a batch when a supplier recalls it.
Batches track quantities and dates, not values: stock is still valued at the product's average cost, so the books and stock valuation work exactly as before.
Switching it on
On the product's page, Edit → Batches and expiry:
- Track batches (lot numbers): every delivery is recorded with its batch number.
- Batches have expiry dates: each batch also needs its expiry date. Set Warn … days before expiry (30 if left empty).
Stock already on hand when you switch it on goes into the product's unassigned batch ("No batch yet"). Assign it to real batches when you can (see below). New products imported from a spreadsheet with a Batch column track batches straight away, and an Expiry column switches expiry dates on too (see Importing products).
Recording batches on goods coming in
For a batch-tracked product, enter the batch number (and the expiry date) on:
- goods receipts against a purchase order;
- supplier bills that bring stock in directly (not against an order);
- opening stock and stock found (positive adjustments).
These are refused without a batch, so nothing arrives unrecorded. When one delivery line holds two batches, choose Another batch on this line and split the quantity. Batch numbers are stored in capitals; typing a batch that already exists fills in its expiry date, and a different date for the same batch number is refused.
Scanning the pack. Medicine packs carry a GS1 DataMatrix code with the batch and expiry date. Scanning it into Batch no. fills both. When receiving against an order, Count by scanning records them per pack (see Receiving goods).
Stock that comes back without a batch goes to the unassigned batch: till returns, the surplus of a stock count, and stock on hand when tracking started. A customer's credit note against an invoice puts the goods back into the batches that invoice took.
Goods going out: first expiry, first out
Sales invoices, the tills, transfers, write-offs and returns to suppliers take the batch that expires first. Then come batches without a date, then the unassigned batch. On an invoice, a supplier credit, a transfer or a write-off you can pick a batch instead of First to expire (automatic).
Expired stock is never sold automatically. If an invoice could only be filled from expired batches, it is refused with the batch named. Pick the batch on the line to sell it on purpose, or write it off. The tills keep selling whatever is on the shelf, because sales are recorded when the shift posts; expired stock still counts there, so write it off promptly.
A transfer moves the batches it took to the other warehouse, and cancelling (voiding) anything puts its batches back exactly as they were.
The Batches and expiry screen
Inventory → Batches and expiry shows stock by batch and warehouse:
- Needs attention: expired, expiring soon, and stock without a batch. The tiles at the top count them, with their value at cost.
- Expiring soon, Expired, Unassigned and All batches tabs, a search by product, SKU or batch, and a warehouse filter.
- Download CSV for the list as shown.
Writing off expired stock: tick the batches (or Select all expired) and choose Write off. Each warehouse gets one stock adjustment posted to 5420 Damaged and expired goods, naming its batches. It can be voided like any adjustment. Returning expired goods to the supplier instead is a supplier credit note with the batch picked on the line.
Assigning stock without a batch: choose Assign on an unassigned row, enter the batch number (and expiry for a new batch) and the quantity. It moves between batches in that warehouse; stock and value do not change. The same is used to correct a batch recorded wrongly.
One batch, start to finish (recalls)
Click a batch number to see:
- where it is now, per warehouse;
- Who received it: the customers invoiced from it, and how much the tills sold;
- its history: when and how it arrived (with the supplier), every sale, return, transfer and write-off, each linking to its document.
When a supplier recalls a batch, this page is the list of customers to contact. With the Pharmacy app, Recall this batch opens a recall that also blocks the batch: the till refuses it, first-expiry-first-out skips it and sales invoices refuse it. The recall then lists the patients it was dispensed to and moves the stock to quarantine, back to the supplier or to a write-off. See Batch recalls and expiry returns.
On invoices and the product page
Posted sales invoices, credit notes and bills print the batches each line moved under the line, for example Batch A12, exp 2027-03-31. The customer's view link shows them too. The product page lists its batches with expiry dates.
Alerts and the assistant
- Automation rule A batch in stock expires within … days: a notification once per batch and warehouse when it comes within the days you set (or each product's warning days), and again once it has expired. See Automation.
- Ask the AI assistant "what expires this month?" or "which batches have expired?".
Good to know
- Stock counts and stocktakes count by product: a surplus goes to the unassigned batch, a shortfall comes out first-expiry-first-out.
- Costs are the product's average cost; batches do not have costs of their own (no FIFO valuation).
- Batch numbers are per product: the same number on two products is two batches.
- The spreadsheet import takes one batch per product for its opening stock. Add further batches with an opening stock adjustment.