From ec14c81ebd505ca894c6411d0553d7b14054d3d5 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Sun, 7 Aug 2016 08:52:45 +0530 Subject: [PATCH] [minor][fix] return if account details not found --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 94709a7b72..4e00c32808 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -772,6 +772,9 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi company_currency = get_company_currency(company) account_details = frappe.db.get_value("Account", account, ["account_type", "account_currency"], as_dict=1) + if not account_details: + return + if account_details.account_type == "Receivable": party_type = "Customer" elif account_details.account_type == "Payable":