From c36524ec547046847197b0df185f8b3996c861ae Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 20 Apr 2018 11:00:20 +0530 Subject: [PATCH] Update chart_of_accounts.py --- .../doctype/account/chart_of_accounts/chart_of_accounts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index dc98db141e..737b34ae71 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -165,7 +165,7 @@ def build_account_tree(tree, parent, all_accounts): tree[child.account_name] = {} # assign account_type and root_type - if child.account_type: + if child.account_number: tree[child.account_name]["account_number"] = child.account_number if child.account_type: tree[child.account_name]["account_type"] = child.account_type @@ -175,4 +175,4 @@ def build_account_tree(tree, parent, all_accounts): tree[child.account_name]["root_type"] = child.root_type # call recursively to build a subtree for current account - build_account_tree(tree[child.account_name], child, all_accounts) \ No newline at end of file + build_account_tree(tree[child.account_name], child, all_accounts)