mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 15:45:01 +00:00
Merge pull request #49994 from frappe/mergify/bp/version-15-hotfix/pr-49991
fix: consider negative qty in batch qty calculation (backport #49991)
This commit is contained in:
@@ -158,7 +158,9 @@ class Batch(Document):
|
||||
|
||||
@frappe.whitelist()
|
||||
def recalculate_batch_qty(self):
|
||||
batches = get_batch_qty(batch_no=self.name, item_code=self.item, for_stock_levels=True)
|
||||
batches = get_batch_qty(
|
||||
batch_no=self.name, item_code=self.item, for_stock_levels=True, consider_negative_batches=True
|
||||
)
|
||||
batch_qty = 0.0
|
||||
if batches:
|
||||
for row in batches:
|
||||
|
||||
Reference in New Issue
Block a user