Savyant Systems ERPNext company

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.

Updated 29 November 2026 · Savyant Systems · Written for ERPNext v16

1. Set up the item

Item settingWhat it does
Has Batch NoEvery movement of this item needs a batch
Automatically Create New BatchERPNext creates the batch on receipt or production
Batch Number SeriesThe pattern used to number new batches
Has Expiry DateEach batch carries an expiry date
Shelf Life In DaysSets the expiry date from the manufacturing date
Retain SampleKeeps 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

ReportAnswers
Batch-Wise Balance HistoryHow much of each batch you hold, by warehouse
Batch Item Expiry StatusWhich batches expire soon, and which have expired
Available Batch ReportWhich batches can be picked right now
Serial No and Batch TraceabilityWhere a batch came from and which customers received it
Stock AgeingHow 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

  1. ERPNext source code, version 16 (GitHub)
  2. ERPNext documentation

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