From 0952dcdda3af3f670800a33f208c1518cff1ab02 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 8 Dec 2012 13:03:57 +0530 Subject: [PATCH] fixed error message in purchase common in update_refdoc_qty --- buying/doctype/purchase_common/purchase_common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py index 9c1187dd01..a59061ca11 100644 --- a/buying/doctype/purchase_common/purchase_common.py +++ b/buying/doctype/purchase_common/purchase_common.py @@ -525,8 +525,12 @@ class DocType(TransactionBase): 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' - 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))) - raise Exception + msg = "error: Already %s Qty for %s is %s and \ + 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 #------------------