Budget report shows an inverted Decay (screenshot Attached)

Bug #380642 reported by amaurynieto
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Medium
Maxime DOYEN

Bug Description

Hello Maxime - I have four transactions as follows:
5/10 - battery -189.60
5/10 - Sanborns -100
5/10 - Bershka -500
5/25 - Venta Inspiron +5270
Balance should be +4480.4

In the budget report, I show a SPENT 4480.4, Budget -1000, Decay -3480.40

Thanks!

A.

Revision history for this message
amaurynieto (amaurynieto) wrote :
Maxime DOYEN (mdoyen)
Changed in homebank:
assignee: nobody → Maxime Doyen (mdoyen)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Hello,

In fact you are right and wrong for this bug.
Right in the way that there is a bug. Wrong about what the bug is.
I explain with your example:

5/10 - battery -189.60
5/10 - Sanborns -100
5/10 - Bershka -500
5/25 - Venta Inspiron +5270
the balance for these 4 transaction is +4480.4

BUT with a budget perspective, the decay is +5480.40.
The budget for the leisure category is -1000, so it is an expense. That represent the 0 for this category and so:
the decay between -1000 to 4480.4 is 5480.40.

So the bug was in my decay computing formula, originally: decay = ABS(budget) - ABS(spent);
I fixed this to:
decay = budget - spent;
and then if budget is an expense, decay should be inverted sign.

I join a screenshot with some king a unit test.

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Confirmed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

In fact this buf was fixed for v4.0.4.
But I forgot to mention it into the Changelog.
Can you give me a feedback about the fix ?

Changed in homebank:
milestone: none → 4.1
status: In Progress → Fix Committed
Revision history for this message
Fabio Correa (facorread) wrote :

Hello, I report that the bug persists in my budget report on HomeBank-4.0.4. In fact, choosing to only see incomes in the report yields no results. Can somebody reproduce?

By the way, HomeBank is great. Thanks for this fine piece of software; keep up the work.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

I will make some test again

Changed in homebank:
status: Fix Committed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

There was 2 problems I have fixed:
1) the income filter was not showing anything.
2) the formula was not correct, the correct one is decay = spent - budget.
Please not well that budget must be negative for expected expense et positive for expected income for a defined category.

Fixed for v4.1

Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
Revision history for this message
Lu Timdale (lutimdale) wrote :

Yes, but my spent values are negative, so I get....
-ve spent minus +ve budget = very -ve Decay.

This is frustrating... should we not be working with positive values for spent and budget???

Please see the attached screenshot.

Thanks.

Lu

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.