From f4816e4960c1fd0cafb34cdac6a8c0361cf62a2b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 8 Oct 2025 18:37:40 +0530 Subject: [PATCH] fix: batch qty for expired batches (cherry picked from commit ff2faf36a7640cda4a9fe4bfb5b1380752af7f97) --- erpnext/stock/doctype/batch/batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 46618a2ca4a..9955b485c22 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -158,7 +158,7 @@ class Batch(Document): @frappe.whitelist() def recalculate_batch_qty(self): - batches = get_batch_qty(batch_no=self.name, item_code=self.item) + batches = get_batch_qty(batch_no=self.name, item_code=self.item, for_stock_levels=True) batch_qty = 0.0 if batches: for row in batches: