fix: consolidated financial statement sums values into wrong parent

fix proposed by Andriesvn in bug report

closes #22180
This commit is contained in:
barry86m 2020-09-08 00:27:57 +01:00 committed by GitHub
parent b828e2fcf4
commit 5b381ac5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name, companies):
"""accumulate children's values in parent accounts"""
for d in reversed(accounts):
if d.parent_account:
account = d.parent_account.split('-')[0].strip()
account = d.parent_account.split(' - ')[0].strip()
if not accounts_by_name.get(account):
continue