budget line with value of 0 not shown in Budget Report

Bug #1415740 reported by Kenny3794
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

Open example.xhb. Go to Budget Report. While in the example accounts, there is a transaction for category "Car", there is no line in this budget report showing that this budget category is above the budget amount (0). Per my understanding of the documentation, this report should show all expense categories with either a budgetted amount OR having a transaction with that category should be included.

Running version 5.0-rc with GTK+ 3.14.7.

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

maybe I should clarify a little bit the documentation (i will)
this is the purpose a 'Force monitoring this category', because a category with a 0.0 budget is not considered to be part of the budget.

Revision history for this message
Kenny3794 (kenny3794) wrote :

Yes - this would help. I did not see that on the budget report pages in help and it does make sense. I have a specific set of categories, so I deleted all unused categories. I can see that not everyone will do this. Thank you for this update to the documentation.

Revision history for this message
Kenny3794 (kenny3794) wrote :

Actually - after re-review (and using the "force" option, I change my response. I don't feel this is adequate. For, example: I have a category A with custom budget as shown:

Jan = $0
Feb = $20
March = $10
April = $0
June = $10
Jul = $10
Aug = $0
Sept = $20
...

I clearly have a budget, and some months it is 0, some > 0. However, circumstances dictate that I need to make a transaction in Jan instead of Feb. This means my Jan expenditures are over budget. The only way to show this as over-budget, is to set for the FORCE option for this and any similar budget items. But in April, I don't spend any money on this item, staying within the $0. For this case, there is no reason to show in the budget as it just crowds out valuable data with non-valuable data. I see that you have this commented out for some reason on line 799 of rep_budget.c.

Perhaps changing the || to && in the commented out code would be better (thus removing $0 budget and $0 spending from the "forced" monitoring)?

Thus, the new code on line 799 of rep_budget.c is:
    if(tmp_budget[pos] || (entry->flags & GF_FORCED && tmp_spent[pos]))

Please consider making this functionality available (or at the least, optional)

Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 5.0
assignee: nobody → Maxime Doyen (mdoyen)
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

don't mixup; the force option purpose is to display the category into the budget report taking no consideration of spend and budget.

for the rest my current test do not point any trouble on the computing so far.
here is a sample file with your example.

Changed in homebank:
status: New → Incomplete
milestone: 5.0 → none
Revision history for this message
Kenny3794 (kenny3794) wrote :

I see that you're example is not the same as mine. In your example, you placed a budget of 20 and a transaction in the same month. I've modified your file to show my example. I also created a snapshot image showing the budget of $0 for Feb (to the right of image), the transaction of $20 for Feb (to the bottom left), and in the budget report (to the top left), there are no lines. I will also add the modified xhb file.

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

should review this

Changed in homebank:
importance: Undecided → Low
milestone: none → 5.0.1
status: Incomplete → Confirmed
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Every category that has a budget (event on another month) is now displayed

Changed in homebank:
status: Confirmed → 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.

Other bug subscribers

Remote bug watches

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