Merge pull request #15530 from rohitwaghchaure/consolidated_report_issue_v11

[Fix] Consolidated Financial Statement report
This commit is contained in:
rohitwaghchaure 2018-09-28 17:06:57 +05:30 committed by GitHub
commit 1cf71d96b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)