ERPNext Batch & Serial Numbers: Expiry, FEFO & Bundles

 · 11 min read

ERPNext batch and serial number tracking with expiry date and Serial and Batch Bundle

If you sell medicines, food, cosmetics, chemicals, spare parts or electronics, you have probably been asked two questions that a simple stock count cannot answer. Which batch did this customer receive? And which unit, with which serial number, did we sell under warranty? In ERPNext, the answers come from batch numbers and serial numbers, and from version 15 onward, from a new document called the Serial and Batch Bundle.

That change confuses many teams who upgraded or started fresh on v15. Old habits, such as typing several serial numbers into one text box, no longer work the same way. This guide explains the design, how to configure items and Stock Settings, how stock is picked by FIFO, LIFO or expiry, and how to trace a batch forward and backward. It follows the official ERPNext documentation, and it flags where behaviour is version-specific.

For the physical side of scanning and labels, read our guides on barcode integration and traceability and barcode and QR codes for inventory.

Key takeaways

  • Batch tracks a lot, serial tracks a unit. Use batches for goods made or bought in lots with an expiry date. Use serial numbers for individual items such as machines, phones or tools.
  • From v15, stock transactions link to a Serial and Batch Bundle. One bundle per transaction, and it cannot be reused across transactions.
  • Picking can follow FIFO, LIFO or Expiry (the first-expired-first-out idea) in Stock Settings, and can be created automatically for outward entries.
  • Negative stock is blocked for serial and batch items from v15, even if Allow Negative Stock is on, so receipts must be posted before issues.

Selling goods that expire or carry warranty?

Tell us your products and how you issue stock. We will design batch and serial tracking in a free 30-minute call.

Plan my batch tracking → WhatsApp us: +91 8089051848

Or email info@nexeves.com

Batch, serial number or neither?

Question If yes, use Typical businesses
Are goods bought or produced in lots, and do you need to recall or trace a lot? Batch number Pharma, food, FMCG, cosmetics, paint, chemicals, textiles dye lots
Does each unit have a unique identity you must track after sale? Serial number Electronics, machinery, vehicles, medical devices, tools
Do goods expire or have a shelf life? Batch with expiry date Food, medicines, adhesives, batteries
Do you only need quantity by warehouse? Neither. Keep it simple Most general trading items

Do not switch tracking on for every item. Each tracked item adds a data-entry step on every receipt and issue. Track only what you must trace, recall or warrant.

What changed in version 15

The ERPNext documentation explains the background. Before v15, the Serial No field on a stock row was a small text field that could hold many serial numbers, which led to data integrity problems. In v15 it became a link field, and a new document, the Serial and Batch Bundle, holds the multiple serial or batch numbers for a transaction row.

  • You must create a separate bundle for every stock transaction. The same bundle cannot be linked to several transactions.
  • Allow Negative Stock does not apply to serial or batch items from v15. You cannot issue what the system does not show as available.
  • The old serial and batch fields can be retained for convenience. If you enable Use Serial / Batch Fields in Stock Settings, users can type serial numbers or a batch as before, and the system creates the bundle on submission.

If you are on v14 or older, plan this change as part of your upgrade. Our v15 to v16 guide and upgrade strategy explain how to test such changes on a staging copy.

Step 1: Configure the Item master

Open the Item and use the Inventory section. The main settings are:

Setting What it does
Has Batch No Turns on batch tracking for the item
Automatically Create New Batch and Batch Number Series On a receipt, ERPNext creates the batch for you using the series. Needed for auto-created inward bundles
Has Expiry Date and Shelf Life In Days Lets you capture an expiry date on the batch, and calculate it from the manufacturing date
Has Serial No and Serial Number Series Turns on serial tracking, and auto-numbers serials on receipt when a series is set
Warranty Period Days of warranty counted for serial numbers, useful with warranty claims

Check these labels against your version, because Frappe occasionally renames fields. Set the series with a clear prefix, such as BT-.YY.-.####, so batch numbers are readable and sortable.

Step 2: Receive stock with batches or serials

For an inward entry, ERPNext can create the bundle for you on submission, as long as the item has a serial number series or has automatic batch creation with a batch series. This applies to a Purchase Receipt or a Stock Entry of type Material Receipt.

If you prefer manual control, create the Serial and Batch Bundle yourself using the Serial and Batch Selector. For inward entries, the Serial No or Batch records must exist first. You can import them from a CSV, using the blank template available from the selector. This is the right route when the supplier already prints batch numbers and expiry dates on the delivery note, and you want to record the supplier's batch, not generate your own.

When you record a batch for an expiry item, enter the manufacturing date and the expiry date from the pack, not an estimate. Auditors and customers will check them.

Stock entries failing after the v15 change?

We fix Serial and Batch Bundle setups, clean up old batch data and train your store team on the new picking flow.

Fix my batch setup → WhatsApp us: +91 8089051848

Or email info@nexeves.com

Step 3: Issue stock by FIFO, LIFO or expiry

For outward entries, such as a Delivery Note or a Stock Entry of type Material Issue, you can either pick manually or let ERPNext pick. In Stock Settings:

  1. Enable Auto Create Serial and Batch Bundle For Outward so the bundle is created on submission.
  2. Set Pick Serial / Batch Based On to FIFO, LIFO or Expiry.

The Expiry option picks the batch that expires soonest, which is the rule most perishable and pharmaceutical businesses want, commonly called FEFO, first expired first out. FIFO issues the oldest received stock first, and LIFO the newest. The same logic is available in the Serial and Batch Selector when a storekeeper picks manually, and you can also create outward bundles by importing a CSV file.

Warehouse staff sometimes find the selector popup slow. Stock Settings lets you disable it if you prefer the old fields, and a clean training session usually solves the resistance. Always test the exact flow on a staging site before you decide.

Step 4: Trace and report

The point of tracking is the report you can run when something goes wrong.

Question Where to look
Where did serial number X go, and what is its history? Serial No Ledger report
How much of each batch is in each warehouse? Batch-wise stock balance reports in the Stock module
Which batches are about to expire? Stock reports by batch and expiry, or a date-based Notification on the Batch expiry date
Who received batch B-2026-0412, and which supplier supplied it? Stock Ledger and the linked Delivery Notes and Purchase Receipts
Which items are ageing without movement? Stock Ageing. See our guide to stock ageing and balance

A mock recall is the best test of your set-up. Pick one batch you received three months ago, then time how long your team takes to list every customer who received it. If it takes more than a few minutes, fix the data entry before a real recall happens.

Return, repack and manufacturing flows

  • Sales returns: return the same batch or serial number against the original delivery, so traceability stays unbroken.
  • Repacking: use a Stock Entry of type Repack and record the new batch created from the old one.
  • Manufacturing: batch-tracked raw materials flow into finished-goods batches through Work Orders. Our posts on the manufacturing module and subcontracting show where batches are consumed and produced.
  • Landed cost: batch and serial items still pick up freight and duty through the landed cost voucher.

Common problems and fixes

Problem Likely cause Fix
Cannot submit a delivery for a batch item No bundle created, or not enough stock in the chosen batch Enable auto bundle for outward, or open the selector and pick available batches
Stock shows but issue is blocked Stock exists only in another warehouse, or negative stock was relied on earlier Check the warehouse. Post pending receipts first. v15 blocks negative serial and batch stock
Serial numbers pasted into one cell do not work Old v14 habit Use the selector, CSV import, or enable Use Serial / Batch Fields in Stock Settings
Duplicate batch numbers from suppliers Two suppliers use the same batch code Use your own batch series, and keep the supplier batch as a separate field or in the batch name suffix
Expired stock still gets sold Expiry picking not enabled, or manual picking Set Pick Serial / Batch Based On to Expiry and block expired batches by policy
Slow submission on big deliveries Very large bundles on a small server Split deliveries, review server resources and test with realistic volumes

Implementation advice from our projects

  1. Decide the batch naming rule with the quality head, not only with IT.
  2. Print the batch and expiry on labels at receiving, so every pallet carries what the system knows.
  3. Train storekeepers on the selector before go-live, and keep a one-page cheat sheet at the packing table.
  4. Migrate opening stock by batch with correct expiry dates. Opening stock without batches defeats traceability. See zero-error data migration.
  5. Run a monthly report of batches expiring in the next 60 to 90 days and decide on discounts or returns before the date passes.

Regulated sectors such as pharmaceuticals and food have record-keeping rules that differ by country. Confirm with your regulator or consultant what batch records and retention periods you must keep, because this guide covers the ERPNext tools, not your legal obligations.

How Nexeves helps

We set up batch and serial tracking for traders, distributors and manufacturers, including opening stock migration and storekeeper training. See our ERPNext inventory management service and contact us through the contact page.

Frequently asked questions

What is a Serial and Batch Bundle in ERPNext?

It is a document introduced in version 15 that links multiple serial numbers or batch numbers to a stock transaction row. You need a separate bundle for each stock transaction, and the same bundle cannot be reused.

Can ERPNext pick stock by earliest expiry?

Yes. In Stock Settings, set Pick Serial / Batch Based On to Expiry, and enable auto creation of the bundle for outward entries. You can choose FIFO or LIFO instead.

How do I track expiry dates in ERPNext?

Enable Has Batch No and Has Expiry Date on the item, then record the manufacturing and expiry date on each batch at receipt. Use batch reports or a date-based notification to see what is about to expire.

Why can I not issue stock for a serial or batch item?

From version 15, negative stock is not allowed for serial and batch items, even when Allow Negative Stock is on. Make sure the receipt is submitted, the warehouse is correct and the bundle has available quantity.

How do I see the history of a serial number?

Use the Serial No Ledger report, which shows the transactions for a serial number. Linked Purchase Receipts and Delivery Notes show the supplier and customer.

Can I still enter serial numbers the old way in v15?

Yes. Enable Use Serial / Batch Fields in Stock Settings. Users can then type serial numbers and batches in the transaction, and ERPNext creates the bundle when the transaction is submitted.

Traceability your auditor and customers can trust

Nexeves configures batch, serial, expiry and warranty tracking for traders, distributors and manufacturers in India and the GCC.

Book my free stock review → WhatsApp us: +91 8089051848

Or email info@nexeves.com

Nexeves serves India & the GCC: UAE (Dubai, Abu Dhabi), Saudi Arabia (Riyadh, Jeddah), Qatar (Doha), Kuwait, Bahrain and Oman (Muscat).


No comments yet.

Add a comment
Ctrl+Enter to add comment