balance report may show wrong values

Bug #1638064 reported by Sebastien Coutaz
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
High
Maxime DOYEN

Bug Description

Hi,

After upgrading from 5.0.8 to 5.1, Balance reports show erroneous values.

I noticed that the initial balance value of the account is always reported as an income value to the first line of the report, which was not the case in 5.0.8. This results in wrong response.

Example from attached anonymized DB:

In 5.1: account 1 --> Balance report --> Last Quarter --> has 8'804.25 income on first line but wrong balance from previous transactions. Adding wrong balance and income from this line is: 12'449.25 which is a wrong value.

In 5.0.8: account 1 --> Balance report --> Last Quarter --> no income on first line but account balance is correct as per previous balance and transactions (12'991.30)

Thanks in advance and best regards,
Sebastien

Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 5.1.1
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Hi,

There was no change on this, since 5.0.8. To get a correct balance, it is mandatory to take the initial balance into consideration (pos or neg).
Try by yourself with the example file on 5.0.8 and 5.1, you will see that there is the initial of 76,22 in both version.

Changed in homebank:
milestone: 5.1.1 → none
status: New → Invalid
Revision history for this message
Sebastien Coutaz (sebcou) wrote :

Hi Maxime,

It is of course true that the initial balance must be taken into consideration otherwise it would be wrong anyway.

The problem with the report in 5.1 is that it now calculates the account balance as if the first date on the report was the creation date of the account. But it doesn't take into account the transactions that happened on the account since it's creation.

Example from my sample file with last quarter report on account 1:

Date = 01.07.2016
Expense = -5195.25 (right)
Income = 8804.25 (initial balance of the account --> wrong)
Balance = 3645.00 (wrong)

On 5.0.8 same reports show:

Date = 01.07.2016
Expense = -5195.25 (right)
Income = nothing (right)
Balance = 12991.30 (right. it is the balance of the account on 30.06.16 minus the expenses of 01.07.16)

If you look at the transactions on account 1, the balance of 12991.30 is right.

For your information, I simply updated from 5.0.8 to 5.1 without changing anything to the database and I noticed the problem appeared. I'm also always prompted to choose the currency when opening the database although I did it and verified that each account has the currency configured.

Thanks in advance and best regards,
Sebastien

Revision history for this message
Yury (yury-kryv) wrote :

The issues affect me exactly as Sebastien describes, both the incorrect balance and the splash screen asking about the currency each time at the start.

Revision history for this message
Yury (yury-kryv) wrote :

The bug affects both Balance Report and Trend Time Report.

Correct ending balance displayed only if date filter is set to "All dates", otherwise the result reflects the difference between the income and expenses over specified period ignoring the balance at the start of such period.

Changed in homebank:
status: Invalid → New
Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 5.1.2
Maxime DOYEN (mdoyen)
Changed in homebank:
assignee: nobody → Maxime Doyen (mdoyen)
importance: Undecided → Medium
status: New → In Progress
Maxime DOYEN (mdoyen)
Changed in homebank:
importance: Medium → High
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Issue only affect balance report, not the time report.
Fixed.

summary: - Reports show wrong values after upgrade to 5.1
+ balance report may show wrong values
summary: - balance report may show wrong values
+ overdrawn report may show wrong values
summary: - overdrawn report may show wrong values
+ balance report may show wrong values
Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.