fix: ignore reserved batches from total available batches

(cherry picked from commit 673b893942)
This commit is contained in:
Kavin
2025-11-19 01:23:26 +05:30
committed by Mergify
parent d8dab986fa
commit 64950d39b5
2 changed files with 6 additions and 1 deletions

View File

@@ -2297,7 +2297,11 @@ def get_auto_batch_nos(kwargs):
stock_ledgers_batches = get_stock_ledgers_batches(kwargs)
pos_invoice_batches = get_reserved_batches_for_pos(kwargs)
sre_reserved_batches = get_reserved_batches_for_sre(kwargs)
sre_reserved_batches = frappe._dict()
if not kwargs.ignore_reserved_stock:
sre_reserved_batches = get_reserved_batches_for_sre(kwargs)
picked_batches = frappe._dict()
if kwargs.get("is_pick_list"):
picked_batches = get_picked_batches(kwargs)

View File

@@ -2313,6 +2313,7 @@ def validate_reserved_batch_nos(kwargs):
"posting_date": kwargs.posting_date,
"posting_time": kwargs.posting_time,
"ignore_voucher_nos": kwargs.ignore_voucher_nos,
"ignore_reserved_stock": True,
}
)
)