fix(stock-report): ignore reserved stock in batch qty calculation

(cherry picked from commit 9a1f551e53)
This commit is contained in:
Pugazhendhi Velu
2025-12-21 12:22:47 +00:00
committed by Mergify
parent 432b33ac5f
commit 26a36d807e

View File

@@ -46,7 +46,11 @@ def get_data(filters=None):
batch_sle_data = (
get_batch_qty(
item_code=item, batch_no=batch_no, for_stock_levels=True, consider_negative_batches=True
item_code=item,
batch_no=batch_no,
for_stock_levels=True,
consider_negative_batches=True,
ignore_reserved_stock=True,
)
or []
)
@@ -109,6 +113,7 @@ def update_batch_qty(selected_batches=None):
item_code=row.get("item_code"),
for_stock_levels=True,
consider_negative_batches=True,
ignore_reserved_stock=True,
)
batch_qty = 0.0
if batches: