fix: dr / cr label for balance of the ledgers in the account tree

This commit is contained in:
Rohit Waghchaure
2019-07-12 15:44:58 +05:30
parent 838697261d
commit 8412f847d4
2 changed files with 3 additions and 2 deletions

View File

@@ -734,6 +734,7 @@ def get_children(doctype, parent, company, is_root=False):
parent_fieldname = 'parent_' + doctype.lower().replace(' ', '_')
fields = [
'name as value',
'root_type',
'is_group as expandable'
]
filters = [['docstatus', '<', 2]]
@@ -741,7 +742,7 @@ def get_children(doctype, parent, company, is_root=False):
filters.append(['ifnull(`{0}`,"")'.format(parent_fieldname), '=', '' if is_root else parent])
if is_root:
fields += ['root_type', 'report_type', 'account_currency'] if doctype == 'Account' else []
fields += ['report_type', 'account_currency'] if doctype == 'Account' else []
filters.append(['company', '=', company])
else: