Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-12-13 13:14:22 +05:30
commit e848e9c4c3
2 changed files with 5 additions and 4 deletions

View File

@ -230,7 +230,7 @@ def get_data(rows, company_abbr):
accounts = [c for c in rows[i+1] if c.endswith(" - " + 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])): if accounts and (len(columns) != rows[i+1].index(accounts[0])):
raise Exception, """A non-account column cannot be after an account \ raise Exception, """All account columns should be after standard columns and \
column. Please rectify it in the file and try again.""" on the right. Please rectify it in the file and try again."""
return data, start_row_idx return data, start_row_idx

View File

@ -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) { cur_frm.cscript.received_qty = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
ret = { 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, 'stock_qty': 0,
'rejected_qty' : 0 'rejected_qty' : 0,
} }
set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details');
cur_frm.cscript.calc_amount(doc, 2); cur_frm.cscript.calc_amount(doc, 2);