[GNC] Budget report fails in multiple currencies

Adrien Monteleone adrien.monteleone at lusfiber.net
Fri Jan 6 18:46:20 EST 2023


Christopher Lamm had been working on various aspects of the Budget 
Report not long ago. He may be able to squeeze in a look at this. He'll 
likely be the one to see your bug report and maybe shed light on the 
math logic.

If I can find some time this weekend I'll test as well. I normally don't 
budget with multiple currencies, but I do use the Budget feature and 
report. (looking at your screenshot, I've never done a multi-year 
budget, so that will be interesting. I'll test too with a single year.)

Concerning the 'roll-up', if you leave the parent blank, it should work. 
(at least it does with a single currency) *But*, you can also put in a 
different value manually for the parent. I'm not sure if that is in play 
here or not. The parent has to be entirely blank, not just a "0" or "0.00"

*note, this is for the Budget itself, your screenshot showed the report 
result, but does the parent roll-up not work on the budget tab either?

With respect to the 'past-period memory', it could be buggy, but I'd be 
inclined to first look really carefully at my report options, *and* the 
budget period setup. (Edit > Budget Options, or Options toolbar button 
once a budget is already open - different from Options button on the 
report tab) I once made an odd mess here myself that produced strange 
numbers that didn't make sense.

Specifically with the Report Options, the General tab can make things 
messy with respect to custom ranges, and Accounts > Account Depth can 
produce odd results if not sufficiently deep, or if flattened.

Additionally, did you simply manually enter all budget values, or did 
you perhaps use the Estimate feature?

Finally, does this book have Trading Accounts enabled by chance? I think 
I understood from your first post that you aren't using them yet. (mine 
does, so I'll test with and without to see if there is difference)

-----
I've been in the habit of hazarding guesses lately, so here's one for 
this topic:

Since the Budget Report does not have an option for commodity price 
source like other reports cognizant of other currencies, I'll 
hypothesize that budgets simply aren't (yet) capable of properly working 
with more than one, or any currency other than the book currency.

Regards,
Adrien

On 1/6/23 4:48 PM, ml enquirer wrote:
> Dear all,
> 
> I've done some digging, and Gnucash totals seem to be wrongly reported for
> budget reports with multi-currency sub-accounts. But I'm not an accountancy
> expert at all, so perhaps someone can explain the accounting logic behind
> it? Perhaps a report that can imply 1+1=3 should have a warning note?
> Should we be ensuring that accounts add up across budget periods, or down
> hierarchies within budget periods? Gnucash is doing the former, but it's
> confusing since the display can imply only the latter is in action.
> 
> I built a local copy of gnucash and tracked the calls through budget.scm
> back to the totalling and currency-conversion that happens in Account.cpp
> and I see where the confusion arises. There is memory of previous budget
> periods built into the reported totals under each asset class (see the
> detail below and the picture attached).
> 
> Isn't it a bit counter-intuitive that the budget reports for 'parent'
> account values in a given budget period, don't need to add up to the sum of
> the 'child' account values when converted by the exchange rate relevant for
> that budget period? I give lots of detail below, where it's clear the
> report is not "buggy", but it is borderline misleading, particularly given
> that the report can be restricted to a single budget period within which it
> appears to say that 30,000 GBP is the sum of 10,000 GBP and 10,000 EUR,
> when the exchange rate is 1GBP = 1EUR. 1+1=3?
> 
> Would love some expert input. Maybe I should report this as a bug and let
> someone set me right there? :)
> 
> Cheers,
> D
> 
> PS: Here's the detail:
> I expected:
> - reported actual "Groceries" total would be the sum of the reported "GBP"
> and "EUR" account spends in that budget period, according to the relevant
> FX rate.
> 
> But in reality:
> - it's actually this year's change in the balance for that account compared
> to the last budget period. That means that while the GBP or EUR rows always
> change by 10,000 each year, and thus always show 10,000 in the budget
> report, the sum of the two - the "Groceries" row - is not necessarily equal
> to 10,000 GBP + 10,000 EUR. In my example, 1EUR = 0.5 GBP for the first two
> budget periods, so the balance of "Groceries" by the end of the second
> period was (10,000GBP+5,000GBP) + (10,000 GBP + 5,000 GBP) = 30,000 GBP.
> But at the end of the third period, the three years' of spending meant that
> the balance of "Groceries" was
> (10,000GBP+10,000GBP)+(10,000GBP+10,000GBP)+(10,000GBP+10,000GBP) = 60,000
> GBP. Difference 30,000 GBP.
> 
> so 1 + 1 = 3.



More information about the gnucash-user mailing list