Bug 350344 – Clarify that (actual) budget values are recursive

Thomas Peterson thomas.tap.peterson at gmail.com
Sun Jun 15 08:08:30 EDT 2008


I've been off hacking the budget report to get it to do what I think it
should do and that now requires me to address the issue in Bug 350344. In
summary, gnc:budget-get-account-period-value returns a non-cumulative value
while gnc:budget-get-account-period-actual-value returns a cumulative value
from the sub-accounts.

My desire is just to eliminate the cumulative nature of
gnc:budget-get-account-period-actual-value so the values can be used in an
oranges to oranges comparison since I believe that using the cumulative
value is inappropriate. The cumulative nature hides data that is specific to
the parent account since the parent account may have transactions against
it.

So I was wondering what would be the recommended best approach to solving
the problem?

I was hoping to solve it from the Scheme level but the cumulative nature of
the behavior is hard-coded in recurrenceGetAccountPeriodValue() and it
appears that the necessary interfaces to lift the behavior up into the
Scheme level are not available.

I would also claim that estimate_budget_helper() is inappropriately using
the cumulative behavior and should be changed as well.

The simplest solution would be to change the call to
xaccAccountGetBalanceChangeForPeriod() in recurrenceGetAccountPeriodValue()
to pass FALSE instead of TRUE.

Another possibility would be to modify all of the associated interfaces so
that the recursive parameter can be passed which would offer more
flexibility in the future.  The existing calls would then be changed to use
FALSE to get the desired behavior.

Suggestions please.

Thanks, Tom


More information about the gnucash-devel mailing list