mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 11:55:11 +00:00
fix: ignore reserved batches from total available batches
(cherry picked from commit 673b893942)
This commit is contained in:
@@ -2297,7 +2297,11 @@ def get_auto_batch_nos(kwargs):
|
|||||||
|
|
||||||
stock_ledgers_batches = get_stock_ledgers_batches(kwargs)
|
stock_ledgers_batches = get_stock_ledgers_batches(kwargs)
|
||||||
pos_invoice_batches = get_reserved_batches_for_pos(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()
|
picked_batches = frappe._dict()
|
||||||
if kwargs.get("is_pick_list"):
|
if kwargs.get("is_pick_list"):
|
||||||
picked_batches = get_picked_batches(kwargs)
|
picked_batches = get_picked_batches(kwargs)
|
||||||
|
|||||||
@@ -2313,6 +2313,7 @@ def validate_reserved_batch_nos(kwargs):
|
|||||||
"posting_date": kwargs.posting_date,
|
"posting_date": kwargs.posting_date,
|
||||||
"posting_time": kwargs.posting_time,
|
"posting_time": kwargs.posting_time,
|
||||||
"ignore_voucher_nos": kwargs.ignore_voucher_nos,
|
"ignore_voucher_nos": kwargs.ignore_voucher_nos,
|
||||||
|
"ignore_reserved_stock": True,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user