From 561be839c55e1e8874cae339e0674c683185f086 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 12 Dec 2012 16:35:31 +0530 Subject: [PATCH 1/2] voucher import tool message --- accounts/page/voucher_import_tool/voucher_import_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.py b/accounts/page/voucher_import_tool/voucher_import_tool.py index ab81801c53..0d3a7f70cd 100644 --- a/accounts/page/voucher_import_tool/voucher_import_tool.py +++ b/accounts/page/voucher_import_tool/voucher_import_tool.py @@ -230,7 +230,7 @@ def get_data(rows, company_abbr): accounts = [c for c in rows[i+1] if c.endswith(" - " + company_abbr)] if accounts and (len(columns) != rows[i+1].index(accounts[0])): - raise Exception, """A non-account column cannot be after an account \ - column. Please rectify it in the file and try again.""" + raise Exception, """All account columns should be after standard columns and \ + on the right. Please rectify it in the file and try again.""" return data, start_row_idx \ No newline at end of file From d8e5dcc6f8ab0c5160579bfbdc79944ce064f089 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 12 Dec 2012 16:52:23 +0530 Subject: [PATCH 2/2] accepted qty = received qty, if not accepted qty --- stock/doctype/purchase_receipt/purchase_receipt.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js index 9ed587b37f..a15573fa80 100644 --- a/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/stock/doctype/purchase_receipt/purchase_receipt.js @@ -150,9 +150,10 @@ cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn) cur_frm.cscript.received_qty = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; ret = { - 'qty' : d.qty ? d.qty : d.received_qty, + 'qty' : (flt(d.qty) && flt(d.qty) < flt(d.received_qty)) + ? flt(d.qty) : flt(d.received_qty), 'stock_qty': 0, - 'rejected_qty' : 0 + 'rejected_qty' : 0, } set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); cur_frm.cscript.calc_amount(doc, 2);