Serial and Batch Bundle fun

We are currently migrating to version 15 and we hit a big road block with new feature called ‘Serial and Batch Bundle’.

When I create a Purchase Receipt for an item with has_batch_no=1 and enter the batch number in the batch_no field, the Purchase Receipt is submitted correctly. However, when I check the Stock Ledger Entry table, the batch_no column is empty.

This is problematic as we have several custom queries that rely on this column for joins.

Is it expected that the batch_no field in the Stock Ledger Entry table will always remain empty from now on?

For instance, would it be accurate to assume that this query is now broken with version 15 ?

SELECT 
	tabItem.item_name, sle.item_code, tabItem.description, sle.stock_uom, sle.batch_no, sle.warehouse, sum(sle.actual_qty) as qty
FROM `tabStock Ledger Entry` sle
LEFT join tabBatch ON tabBatch.name = sle.batch_no
INNER JOIN tabItem ON tabItem.name = sle.item_code
WHERE warehouse = %(warehouse)s
AND sle.is_cancelled = 0 
GROUP BY sle.item_code, sle.batch_no
HAVING sum(actual_qty) > 0;

Here are my Stock Settings:

Is there a way to disable this feature and maintain the original batch behavior from version 14?

Which version do you use?

We’ve disabled it completely and use it as v14. Our companies use serial nos extensively without any problem. I am not sure about batch side.

PS: Some of our customers eagerly waiting v15 to use Serial Batch Bundle :slight_smile: It solves some of their problems in textile industry.

I’m using ERPNext v15.34.0.

Even though Use Serial / Batch Fields is checked, Stock Ledger Entry has no batch_no assigned.

This has huge impact on our app as it breaks many custom queries relying on sle.batch_no. Even worse, old entries keep their batch_no and new ones have no batch_no. So now we have to add this useless logic to handle both cases…

It is regrettable that the Serial and Batch Bundle feature provides no tangible benefits to our customers. Instead, it unnecessarily complicates the process when managing a single batch or a limited number of batches.

try clicking on the checkmark ‘segregate serial and batch Bundle’ in the stock ledger report… I think the batch value then will be displayed
image