Help for setting up Batch numbers


I need setting up batch numbers with following scenerios:

We buy an item AAA of quantity 5,00,000 Nos.

UoM for both purchase and sale is Nos.

Item AAA comes in packing Box of 1500 Nos.

Each box has different Batch number (sometimes in sequence order)

For example:

  1. 20 Boxes of Batch no. ABCD1101, ABCD1102, ABCD1103,…ABCD1120

  2. 20 Boxes of Batch no. BXBC2120, BXBC2121, BXBC2122,…BXBC2119. AND so on till 5,00,000 Nos are achieved.

We must enter all the batch numbers to keep track of all the items and ship them as per FIFO.

Please suggest appropriate stems to achieve this procedure.



@umair can you add a KB article for this? There is no docs for using Batches…


Sorry for the delay in response. Please check following link for help in managing batchwise inventory in ERPNext.

You should create/import Batch master, and then select it while creating Purchase Receipt for it.

In item master, you should set valuation method as FIFO.

Hope this answers your query.


My issue is not resolved yet

There is no system for the batch to be added for certain quantity not the whole lot of Purchase Invoice.

I want to add batch to a box of 1500 Nos out of 500000 Nos.

Please read my first post and suggest how can I achieve this.


@umair The link you provided is not working anymore. Could you please tell me where to find it?

Also, I’m interested in Ashish’s requirement as well. It applies to me in Pharma industry. Any updates you can provide?

You can enter the item in multiple lines with 1500 qty in each row with different batch no.

This ERPNext Manual page discusses Batch inventory, perhaps this is the updated link: