How do I work with batches and expiry dates?
A batch groups units of an item that came in together, with the code the supplier put on the label. It lets you know at all times which batch is in each warehouse, when it expires and which customer it ended up with. This is what inspections require in food and pharmacy.
What do I need before I start?
You need batch management to be switched on in your company. It is a company decision, not a user preference. If you don’t have it switched on, you won’t see the field or the screens on this page.
It is switched on in Settings → Warehouse and production → Warehouse, Control, batches and serial numbers block, Batch management drop-down. That screen is handled by whoever administers the ERP; if you can’t get to it, ask them.
In the same place you decide how batches go out when you sell, which is worth checking before you start:
- Batch on outgoing movements: whether the system suggests it or you choose it on each line.
- Outgoing order of batches: the oldest goes out first (FIFO) or the one that expires first (FEFO). With expiry dates, FEFO is the normal choice.
With management switched on, each item says on its record whether it is batch-tracked: General tab, Traceability field, By batch option. You don’t need to go record by record: see the next question.
While management is switched off, the ERP behaves exactly as if batches didn’t exist.
How do I make items batch-tracked without ticking them one by one?
A new item starts with the traceability of its item family. It is decided in two places:
- In the item family: in Warehouse → Items, open the item family and choose Traceability of its items (By batch, By serial number or No traceability). A sub-family that doesn’t say anything uses its parent family’s.
- In the company: in Settings → Warehouse and production → Warehouse, Traceability of new items drop-down. It applies to items whose item family, and none above it, says otherwise.
From then on, every item added to that item family —by hand, from a purchase or with the assistant— starts with that traceability. It can be changed later on its record.
For items that already existed, save the item family and click Apply to its items, next to the drop-down. It gives the item family’s traceability to its items that don’t have any, including those in sub-families that inherit it. Those that already have one aren’t touched.
Items that arrive by import (Excel, CSV or the migration from the Desktop ERP) don’t take it on their own: they bring their stock without splitting it into batches. When you have them, use Apply to its items.
How do I enter the batch when buying or selling?
In the document there is a Serial/Batch column on each line, with a button at the end of the cell. That button opens the breakdown window. It also opens with F9 from any cell on the line, and the ERP opens it on its own when the line needs it.
The window asks you to split the line’s quantity between batches:
- Type the batch code in the field at the top.
- Type the batch Qty. If you leave it empty, it takes everything still pending.
- For incoming stock, also type the expiry date from the label. It is saved with the document, so if you make a mistake you can reopen it, go back to the breakdown and correct it. Empty means that batch doesn’t expire.
- Click Add or press Enter. The batch goes into the window’s list, but it isn’t on the line yet.
- Repeat until the Pending indicator reaches zero.
- Click OK, or Ctrl+Enter. That is what takes the split to the line.
For outgoing stock you also have the Available panel with the batches there are in that warehouse, their quantity, their date in and their expiry date. Move through it with the arrow keys and add with Enter or by double-clicking.
Esc, Cancel, the X or clicking outside the window close it without saving the split. If you have changed something, it asks you first: OK and close saves it on the line, Discard throws it away and Keep editing goes back to the window. With the question on screen, Enter accepts and a second Esc discards.
The summary of the split stays in the line’s Serial/Batch cell. On the printed delivery note or invoice it appears below the line description: ‘Batch: L1 · Exp. 28/12/2026’ if it is a single batch, or ‘Batches: L1×5 (exp. 28/12/2026); L2×3’ if there are several. The expiry date appears when the batch has one.
Remember that the split is saved with the document: if you leave the document without saving it, it is lost like any other change.
How does the ERP choose the batch when selling?
For outgoing stock, the ERP suggests the split on its own. You can always correct the suggestion from the breakdown window; when the line allows an automatic suggestion, the Suggest button recalculates it from scratch.
The company decides the criterion, and it is one of these two:
- Oldest first, by date into the warehouse. This is the default criterion.
- First to expire first. Batches with no expiry date are left until last.
With the expiry criterion, the automatic suggestion skips batches that have already expired and tells you in a message: ‘Expired batches left out of the proposal: …’. You can force them by hand if you really want to take them out: the ERP warns you, but doesn’t stop you.
If a batch isn’t enough to cover the quantity, it carries on with the next one. When all of them together aren’t enough, the window warns you how many units are left without a batch.
What happens if I don’t enter the batch?
It depends on the direction of the document.
For incoming stock (a purchase) the batch is required and there is no way of guessing it: it is the one on the supplier’s label. If you try to issue without a breakdown, the document isn’t issued and you will see ‘Line N is an incoming line for an item with batch traceability: enter the breakdown before issuing.’
For outgoing stock the ERP suggests it on its own, so normally you don’t have to do anything. It only stops if the suggestion doesn’t cover the quantity, and then it tells you why.
Where do I see the batches I have and which ones are expiring?
On the item record, Batches tab. It only appears for items set to By batch.
The Batches block is the same list as in the Desktop ERP: one row per batch and warehouse with these columns.
- A red icon if the batch is pending (it still has stock) or green if it is depleted (used up).
- Batch and Warehouse.
- Stock: what is left.
- Outgoing and Incoming: what went out and came in through documents (sales, purchases, production…).
- Initial: what there was without a document to explain it, such as the opening load when you started using the ERP. It always holds: stock = initial + incoming − outgoing.
- Expiry date, with the Expiring soon mark if it expires in the next 30 days or Expired if it has already passed.
- Purchase, Document and Supplier: the batch’s last receipt.
- Sale, Document and Customer: the last issue.
At the top you choose which batches to see with Status (View all batches, Pending batches only or Depleted batches only), you can narrow by purchase date with Purchased from and to, and filter by batch code. The list is sorted by purchase date.
Used-up batches stay in the list. It isn’t a mistake: their history is legal information and is kept. Clicking a row opens its traceability below.
Each batch’s stock is kept up to date on its own: adding, deleting or changing a line of an issued document —its quantity or its batch— corrects at the same time the item’s stock and that of each batch affected.
How do I correct a batch’s expiry date?
The expiry date is saved only once per item and batch, with the data you entered on receipt. It applies to the whole history of that batch, in all warehouses.
To correct it, edit again the stock-in document that added that batch and type the right date in its breakdown window. When you save, the expiry date is corrected.
Undoing or voiding that receipt doesn’t delete the expiry date: it is a physical detail from the label, not a consequence of the document.
If something goes wrong
| What you see | What has happened | What to do |
|---|---|---|
| The Serial/Batch column doesn’t appear | Batch management is switched off in the company | Ask whoever administers the ERP |
| I can’t set By batch on the item | Same cause | Same |
| New items start with No traceability | Neither their item family nor the company says otherwise | Choose Traceability of its items in the item family, or Traceability of new items in Settings → Warehouse |
| ‘Item family … has no traceability (or its module is disabled): there is nothing to apply.’ | You clicked Apply to its items with the item family having no traceability | Choose its traceability, save the item family and click it again |
| I added a batch, left the window and when I came back it wasn’t there | The window was closed without OK | Add it again and click OK; if you close with changes, it now asks |
| ‘Line N is an incoming line for an item with batch traceability: enter the breakdown before issuing.’ | The batch is missing on a purchase | Open the window with F9 and type the batch |
| ‘Line N is for a batch-tracked item: every split must have a batch.’ | There is a row in the breakdown with no code | Type the batch or remove that row |
| ‘The batch/serial number split of line N (…) does not match the quantity it moves (…)’ | The split doesn’t add up to the line’s quantity | Adjust the quantities until Pending reaches zero |
| ‘Insufficient batch stock: N units are left without an assigned batch.’ | There isn’t enough in that warehouse’s batches | Reduce the quantity, or record the missing receipt first |
| ‘Expired batches left out of the proposal: …’ | The expiry criterion skipped expired batches | This is correct; if you want to take them out, add them by hand |
| ‘Line N requires a batch breakdown: the batch allocation policy is manual’ | The company doesn’t suggest batches automatically | Open the window with F9 and choose the batches |
| An expired batch still appears in Available | The window shows everything there is | This is correct: it is marked in red, but it can be used |
See also: Work with serial numbers · Follow the traceability of a batch or a serial number · Batch and traceability reports · View and correct an item’s stock
More about Warehouse
- How do I raise or lower the prices of many items at once?
- How do I view and correct an item’s stock?
- How do I count the warehouse and balance the stock?
- How do I add a warehouse?
- Managing the warehouse
- What batch and traceability reports do I have?
- How do I move stock from one warehouse to another?
- How do I run the stock report?
- How do I follow the traceability of a batch or a serial number?
- How do I work with serial numbers?
- How do I work with sizes and colours?