mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-29 03:28:32 +00:00
fix: consider negative qty in batch qty calculation
(cherry picked from commit 912ffc2d64)
This commit is contained in:
committed by
Mergify
parent
1ab45386a8
commit
4370a59183
@@ -158,7 +158,9 @@ class Batch(Document):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def recalculate_batch_qty(self):
|
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
|
batch_qty = 0.0
|
||||||
if batches:
|
if batches:
|
||||||
for row in batches:
|
for row in batches:
|
||||||
|
|||||||
Reference in New Issue
Block a user