chore: update reserved stock SLE validation
This commit is contained in:
parent
a527221709
commit
7e8fd8f324
@ -1010,7 +1010,6 @@ class update_entries_after(object):
|
||||
msg_list = []
|
||||
for warehouse, exceptions in self.exceptions.items():
|
||||
deficiency = min(e["diff"] for e in exceptions)
|
||||
msg_prefix = _("As {} units are reserved").format(frappe.bold(self.reserved_stock))
|
||||
|
||||
if (
|
||||
exceptions[0]["voucher_type"],
|
||||
@ -1036,7 +1035,10 @@ class update_entries_after(object):
|
||||
|
||||
if msg:
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user