A batch is a group of units of an item that you make or buy together, such as one production lot. When an item has batches, Frappe Books keeps the stock and the value of each batch separately. Each document row of the item names its batch.
Turn On Batches
Batches need inventory. Turn on Enable Batches in the Features section of the inventory settings. Then save the settings and reload Frappe Books.
Set Up an Item
- Open the item, for example from Sales > Sales Items in the sidebar.
- Make sure that Track Inventory is selected.
- Select Has Batch.
- Optional: Enter a Batch Series, such as
LOT. - Click Save.
Has Batch shows only when Track Inventory is selected. You can select Track Inventory only on a new item.
Batch Series
Frappe Books makes a new batch for each row of the item that has no batch. It does this when you save a purchase invoice, a purchase receipt, or a Material Receipt. This does not apply to returns. If an item has no batch series, select or make a batch in each row.
Frappe Books adds a dash and a number to the series, starting at 1001. For example, the series LOT gives LOT-1001, LOT-1002, and so on. It skips the numbers that are already used. A series cannot contain /, ?, &, =, or %.
Make a Batch
There is no sidebar item for batches. Search for Batch in Quick Search and open the List result.
- In the list of batches, click New.
- Enter the name of the batch in Batch.
- Select the Item.
- Optional: Enter the Expiry Date and the Manufacture Date.
- Click Save.
You can also make a batch from the row of a stock movement, an invoice, or a quote. Type the name of the new batch in Batch and click Create. The new batch gets the item of the row.
Frappe Books does not check the expiry date. For example, you can sell a batch after its expiry date.
Select a Batch in a Document
- Add the item to the document.
- Click the Edit row button at the end of the row. On a phone, tap the row.
- In Batch, select the batch.

In a sales invoice or a sales quote, the list shows only the batches that have stock at the location that the sale ships from. Other documents and returns show all the batches of the item. In the Point of Sale, the Select Batch dialog opens when you add an item with batches.
A sale ships from the Shipment Location in the Defaults settings, or from the POS inventory for a POS sale. If the Shipment Location is empty, Frappe Books uses the stock of all locations.
On a sales invoice or a sales quote, Frappe Books checks the stock of the batch. It checks when you select the batch, when you change Qty, and when you save. If the batch does not have enough stock, the field shows an error. It does not check the batch stock on a return.
Rules for Batches
Frappe Books shows an error and does not save or submit the document in these cases:
- A row of an item with batches has no batch.
- A row of an item without batches has a batch.
- The batch belongs to a different item.
- When you submit a document that takes stock out, the batch does not have enough stock at the source location.
Batches in Reports
When batches are on, the Stock Ledger and the Stock Balance have a Batch column and a Batch filter. The Stock Balance shows one row for each batch of an item at a location.