-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Budget Report Features: Rollover (Envelope) Budgeting and Unselected Account Exclusion #1990
base: stable
Are you sure you want to change the base?
Budget Report Features: Rollover (Envelope) Budgeting and Unselected Account Exclusion #1990
Conversation
@christopherlam it looks like you've worked a bit on the budget report, would you be a good person to weigh in here? |
I haven't verified the actual code, but the existing "Use accumulated amounts" option aims to accumulate budget + actual values across periods, which means any budget surplus or deficit is accounted for in the subsequent periods. Would your change be different from the existing option? The other concern about excluding accounts is a nice idea, however, it will be a fundamental difference in the derivation of parent account totals. How do other budget reports handle subaccounts? I haven't checked them all. How does the budget editor and the budget editor 'Estimate' tool handle subaccounts? |
@christopherlam I apologize for the very long delay, my GitHub notifications don't seem to be working as expected but I'll look to fix that. Thank you for the great questions, and sorry for the long reply. Rollover (Envelope) Budget vs Accumulated AmountsThis is a great question about the difference between Accumulated Amounts and Budget Rollover. It's in the Budget and Actual values for each period: Accumulated Amounts shows a total across all budget periods, while Budget Rollover shows only each period's value, with adjustments to the Budget value for the previous periods' differences. For example, if you budget $1000 per month for Groceries, with Accumulated Amounts in the 6th budget period your Actual value would be your total spend across the six periods, and your Budget value will always be $6000. With Rollover, your Actual value would be only the amount during the 6th period, and your Budget value in the 6th period will be $1000 plus or minus the total amount you overshot or undershot the budget during the previous five periods. More concretely, suppose we have the following Budget and Actual for six periods:
With Accumulated Amounts enabled, we would get the following:
With Rollover Budget enabled, the "Difference" column will be the same as with Accumulated Amounts, but we'll see the Budget and Actual values for each period instead of running totals. The $1000 Budget value for each period will be adjusted to include the difference from the previous period:
Excluding SubaccountsGreat questions, thank you! I had looked a bit at the budget editor but not considered the Estimate tool or other budget reports. Responding inline:
If a parent account has its own value specified directly in the budget, that value is used as the budget value. If it has no value specified, but its children do have values specified, the sum of its children is used for the budget value. In this case where the parent account is just the total of children, the text is light grey instead of black to indicate as much.
This appears to use the total including all subaccounts for estimation. This makes sense since there is no account selection in the budget editor.
This was a very interesting question, the answer is a bit all over the place. My main discovery is the "Parent account balances" option which offers similar functionality but only works as expected in one of the three available reports. I think in the long term, it would make sense to consolidate all possibilities into this option and fix it across all reports. Budget Balance Sheet: Already includes this feature. Either by setting "Parent account balances" to "Calculate Subtotal" (sum of only selected children), or "Parent account subtotals" to "Show subtotals" (shows at bottom on new row instead of as parent account balance). However I found the "Account balance" option of "Parent account balances" did not work: it displayed 0 even when the parent account had a balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks reasonable to me, but surely these changes warrant corresponding changes in test-budget-report.scm.
Yep absolutely! Just didn't want to write them upfront if these were best left to my custom reports:
I'll add tests and then mark this PR as ready. |
Hi Gnucash team! I'm a longtime user and have opened a PR with two features I added to my custom Budget Report, in case they're useful to others in the community. The features are:
I implemented these because they're valuable to me, and I thought others in the community might find them useful as well. If maintainers agree that either or both make sense to have in the main program, I'll add unit tests and implement any suggested changes. If they're best left to a Custom Report, I'll keep using them myself that way!
Thanks,
Reese
Details
Budget Rollover
The implementation of budget rollover is similar to the Accumulated Amounts feature: when the option is selected, previous periods are added up along with the current period. The difference as that with Budget Rollver, the Budget totals from previous periods are added to the current period Budget but Actual totals from previous periods are subtracted from the current period budget, rather than being added to the current period Actuals. Only one of the Use Accumulated Amounts and Rollover Budget Difference options can be selected.
I found quite a few mailing list messages requesting this feature, so I believe this one in particular may be valuable. A sampling:
Unselected Account Exclusion
In general, Unselected Acount Exclusion works by subtracting the balance of unselected accounts from selected parent/ancestor accounts. The nuance is that sometimes balances need to be added as well. For example, if a grandparent account is selected, parent account is unselected, and child account is selected, the parent account balance will be subtracted from the grandparent balance and child account added to the grandparent balance. This is explained in greater detail in this code comment.
An ideal solution would probably just be a C++ function to get an account balance with these offsets. But unfortunately my C(++) skills are almost nonexistent, so learning Scheme and implementing it this way worked best for me.
I didn't find any mailing list messages for this one so there may not be much other interest but I was also less sure what to search for here.