mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
chore: update reserved stock SLE validation
This commit is contained in:
@@ -1010,7 +1010,6 @@ class update_entries_after(object):
|
|||||||
msg_list = []
|
msg_list = []
|
||||||
for warehouse, exceptions in self.exceptions.items():
|
for warehouse, exceptions in self.exceptions.items():
|
||||||
deficiency = min(e["diff"] for e in exceptions)
|
deficiency = min(e["diff"] for e in exceptions)
|
||||||
msg_prefix = _("As {} units are reserved").format(frappe.bold(self.reserved_stock))
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
exceptions[0]["voucher_type"],
|
exceptions[0]["voucher_type"],
|
||||||
@@ -1036,7 +1035,10 @@ class update_entries_after(object):
|
|||||||
|
|
||||||
if msg:
|
if msg:
|
||||||
if self.reserved_stock:
|
if self.reserved_stock:
|
||||||
msg = "{0}, {1}".format(msg_prefix, msg)
|
allowed_qty = abs(exceptions[0]["actual_qty"]) - abs(exceptions[0]["diff"])
|
||||||
|
msg = "{0} As {1} units are reserved, you are allowed to consume only {2} units.".format(
|
||||||
|
msg, frappe.bold(self.reserved_stock), frappe.bold(allowed_qty)
|
||||||
|
)
|
||||||
|
|
||||||
msg_list.append(msg)
|
msg_list.append(msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user