fix: batch qty for expired batches

(cherry picked from commit ff2faf36a7)
This commit is contained in:
Rohit Waghchaure
2025-10-08 18:37:40 +05:30
committed by Mergify
parent 33f67012b4
commit f4816e4960

View File

@@ -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: