[Fix] Consolidated Financial Statement report

This commit is contained in:
Rohit Waghchaure 2018-09-28 17:05:55 +05:30
parent 183972f58f
commit ea0ef95539

View File

@ -238,6 +238,9 @@ def accumulate_values_into_parents(accounts, accounts_by_name, companies):
for d in reversed(accounts):
if d.parent_account:
account = d.parent_account.split('-')[0].strip()
if not accounts_by_name.get(account):
continue
for company in companies:
accounts_by_name[account][company] = \
accounts_by_name[account].get(company, 0.0) + d.get(company, 0.0)