Batch Management
Version 15 Update: Negative stock transactions are not allowed for Serial and Batch items, even if “Allow Negative Stock” is enabled in Stock Settings.
Batch feature in ERPNext allows you to group multiple units of an Item into a single identifiable set called a Batch. Each batch is assigned a unique Batch No, which helps track stock based on manufacturing lot, expiry, or production run.
This is especially useful when items need to be tracked together for quality, expiry management, or regulatory compliance.
1. Prerequisites
Before using batch tracking, ensure the following setup is completed:
- Create an Item (Item master must exist before batch configuration).
- Enable Has Batch No in the Item master for items that require batch tracking.
- Enable “Serial and Batch No” feature from Stock Settings to activate batch functionality across transactions.
Once batch tracking is enabled for an item, every stock transaction involving that item must include a Batch No.
2. How to create a Batch
A Batch represents a unique identifier assigned to a group of items.
- Go to the Batch list and click New.
- Enter a unique Batch ID (Batch No).
- Select the corresponding Item (Item must have “Has Batch No” enabled).
- Save the record.
Once a batch is used in any stock transaction, its core details cannot be changed or reassigned.
2.1 Automatic Batch Creation
Instead of creating batches manually, ERPNext can auto-generate them:
- Enable Automatically Create New Batch in the Item master.
- When a Purchase Receipt is submitted, a new Batch No is automatically created.
3. Key Features
3.1 Splitting and Moving Batches
Batches can be managed dynamically based on warehouse operations.
- Move Batch: Transfer batch stock from one warehouse to another without altering the batch identity.
- Split Batch: Divide a batch into multiple smaller batches while maintaining traceability.
Splitting batches helps in managing partial consumption, repackaging, or separating stock based on expiry or quality differences.
3.2 Batch Expiry Management
Batch records can include expiry dates:
- If an expiry date is set, the system automatically marks the batch as Expired after that date.
- If no expiry date is set, the batch status remains Not Set.
4. Using Batches in Transactions
Batch numbers must be selected in all stock-related transactions involving batch-enabled items.
- Purchase Receipt
- Delivery Note
- Stock Entry
- Sales Invoice (if inventory impact is enabled)
Batch selection is automatically filtered based on Item, Warehouse, expiry date, and available quantity.
Batch assignment is mandatory for every movement of batch-enabled items. Without a valid Batch No, stock transactions cannot be submitted.
5. Key Considerations
- Negative stock is not allowed for batch items in Version 15.
- Batch tracking ensures traceability of inventory across warehouses.
- Each batch maintains independent valuation and quantity tracking.
- Batch numbers help in compliance, warranty tracking, and expiry management.
6. Related Topics
- Serial Number Management
- Stock Entry
- Warehouse Management
- Item
- Stock Reconciliation