ERPNext guide
Batch and expiry tracking in ERPNext v16
Short answerIn ERPNext v16 you switch on batch tracking per item, let the system number batches automatically, give each batch an expiry date from the item's shelf life, and tell the stock settings to pick the batch that expires first. Built-in reports then show stock by batch, items close to expiry and where each batch went.
1. Set up the item
| Item setting | What it does |
|---|---|
| Has Batch No | Every movement of this item needs a batch |
| Automatically Create New Batch | ERPNext creates the batch on receipt or production |
| Batch Number Series | The pattern used to number new batches |
| Has Expiry Date | Each batch carries an expiry date |
| Shelf Life In Days | Sets the expiry date from the manufacturing date |
| Retain Sample | Keeps a sample quantity from each batch |
2. Pick the batch that expires first
In Stock Settings, Pick Serial / Batch Based On can be FIFO, LIFO or Expiry. Expiry makes delivery and picking suggest the batch with the earliest expiry date first, which is what most food, pharma and FMCG businesses need.
3. How batches move in v16
Since ERPNext v15, batch and serial details on each transaction sit in a Serial and Batch Bundle. One bundle can hold several batches with their quantities, so a single delivery line can ship from more than one batch.
4. Reports to use
| Report | Answers |
|---|---|
| Batch-Wise Balance History | How much of each batch you hold, by warehouse |
| Batch Item Expiry Status | Which batches expire soon, and which have expired |
| Available Batch Report | Which batches can be picked right now |
| Serial No and Batch Traceability | Where a batch came from and which customers received it |
| Stock Ageing | How long stock has been sitting |
Questions to settle before go-live
- Which items really need batches; tracking everything adds work at every receipt
- Whether supplier batch numbers are kept or replaced by your own series
- What happens to expired stock: a scrap warehouse, a write-off or a return
- Whether labels with batch barcodes are printed at receipt
Sources
Planning an ERPNext project?
Tell us what you run today and what you want ERPNext to do. A consultant replies within one working day.
Book a free consultation