diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index d2ea4cd316..8fc785c88b 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -102,7 +102,7 @@ def round_off_debit_credit(gl_map): debit_credit_diff += entry.debit - entry.credit debit_credit_diff = flt(debit_credit_diff, precision) - if abs(debit_credit_diff) >= (2.0 / (10**precision)): + if abs(debit_credit_diff) >= (5.0 / (10**precision)): frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.") .format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff)) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 00e595fcb3..08402f3a49 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -16,12 +16,16 @@ def get_party_details(party=None, account=None, party_type="Customer", company=N if not party: return {} + + if not frappe.db.exists(party_type, party): + frappe.throw(_("{0}: {1} does not exists").format(party_type, party)) return _get_party_details(party, account, party_type, company, posting_date, price_list, currency, doctype) def _get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False): + out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date, doctype)) party = out[party_type.lower()] diff --git a/erpnext/templates/form_grid/includes/visible_cols.html b/erpnext/templates/form_grid/includes/visible_cols.html index e9be40ceb2..c26f279337 100644 --- a/erpnext/templates/form_grid/includes/visible_cols.html +++ b/erpnext/templates/form_grid/includes/visible_cols.html @@ -1,6 +1,6 @@ {% $.each(visible_columns || [], function(i, df) { %} {% var val = doc.get_formatted(df.fieldname); - if((df.fieldname !== "description") && val) { %} + if((df.fieldname !== "description" && df.fieldname !== "item_name") && val) { %}