Browse Source

Fix comparison between balances

pull/207/head
Matthieu Dietrich 9 years ago
parent
commit
4e769542dc
  1. 3
      account_financial_report_webkit/report/common_balance_reports.py
  2. 2
      account_financial_report_webkit/report/common_partner_balance_reports.py

3
account_financial_report_webkit/report/common_balance_reports.py

@ -312,7 +312,8 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
for comp_account_by_id in comp_accounts_by_ids: for comp_account_by_id in comp_accounts_by_ids:
values = comp_account_by_id.get(account.id) values = comp_account_by_id.get(account.id)
values.update( values.update(
self._get_diff(account.balance, values['balance']))
self._get_diff(balance_accounts[account.id],
values['balance']))
display_account = any((values.get('credit', 0.0), display_account = any((values.get('credit', 0.0),
values.get('debit', 0.0), values.get('debit', 0.0),
values.get('balance', 0.0), values.get('balance', 0.0),

2
account_financial_report_webkit/report/common_partner_balance_reports.py

@ -306,7 +306,7 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
values = comp_account_by_id.get(account.id) values = comp_account_by_id.get(account.id)
values['account'].update( values['account'].update(
self._get_diff(account.balance,
self._get_diff(balance_accounts[account.id],
values['account'].get('balance', 0.0))) values['account'].get('balance', 0.0)))
comp_accounts.append(values) comp_accounts.append(values)

Loading…
Cancel
Save