From c050c6945cd941cd94b69006df643608b4bca5b0 Mon Sep 17 00:00:00 2001 From: tundebabzy Date: Wed, 13 Sep 2017 10:57:30 +0100 Subject: [PATCH] show error message if cannot get accounts details (#10768) --- erpnext/accounts/report/financial_statements.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index d81c1ebc88..b0c49dfbd8 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -142,10 +142,16 @@ def get_data(company, root_type, balance_must_be, period_list, filters=None, return out + def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values, ignore_accumulated_values_for_fy): for entries in gl_entries_by_account.values(): for entry in entries: d = accounts_by_name.get(entry.account) + if not d: + frappe.msgprint( + _("Could not retrieve information for {0}.".format(entry.account)), title="Error", + raise_exception=1 + ) for period in period_list: # check if posting date is within the period