fixed error message in purchase common in update_refdoc_qty
This commit is contained in:
parent
85e785fa0d
commit
0952dcdda3
@ -525,8 +525,12 @@ class DocType(TransactionBase):
|
|||||||
|
|
||||||
if max_qty_plus_tol < qty:
|
if max_qty_plus_tol < qty:
|
||||||
reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Purchase Invoice') and 'Billed'
|
reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Purchase Invoice') and 'Billed'
|
||||||
msgprint("error:Already %s Qty for %s is %s and maximum allowed Qty is %s" % (cstr(reason), item_code, cstr(flt(qty) - flt(curr_qty)) , cstr(max_qty_plus_tol)))
|
msg = "error: Already %s Qty for %s is %s and \
|
||||||
raise Exception
|
maximum allowed Qty is %s [against %s: %s]" % \
|
||||||
|
(cstr(reason), item_code,
|
||||||
|
cstr(flt(qty) - flt(curr_qty)) , cstr(max_qty_plus_tol),
|
||||||
|
cstr(ref_dt), cstr(ref_dn))
|
||||||
|
msgprint(msg, raise_exception=1)
|
||||||
|
|
||||||
# Update qty
|
# Update qty
|
||||||
#------------------
|
#------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user