From 79ffc2b3a79ceb3d74eee27289ba211598374abf Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 25 Feb 2015 18:32:08 +0530 Subject: [PATCH] fix in financial statements --- erpnext/accounts/report/financial_statements.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 9978bb44d47..4ae61ca5138 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -161,7 +161,8 @@ def add_total_row(out, balance_must_be, period_list): def get_accounts(company, root_type): # root lft, rgt root_account = frappe.db.sql("""select lft, rgt from `tabAccount` - where company=%s and root_type=%s order by lft limit 1""", + where company=%s and root_type=%s and ifnull(parent_account, '') = '' + order by lft limit 1""", (company, root_type), as_dict=True) if not root_account: