[GNC] Budget report fails in multiple currencies

ml enquirer ml.hnel.227484 at gmail.com
Sat Jan 7 04:21:10 EST 2023


Just to add that I was wrong that this could be solved by making budgets
with a single period. I *think* this problem arises for any multi-currency
sub-accounts and becomes visible when you have a book which has been
running for many years. In that circumstance, the 'actual' column is only
incrementally affected by spends during the actual reporting period (which
are small compared to the cumulative spending over the years).

Imagine a case where there is *no* spend on any sub-account in a reporting
period, but the years prior total 1,000,000 EUR and 1,000,000 GBP. Imagine
the exchange rate is 1 EUR to GBP at the start of this new 'empty' period
and 1 EUR to 1.01 GBP at the end.
1) The computed total at the start will be 1,000,000 EUR + 1,000,000 GBP =
2,000,000 GBP.
2) The computed total at the end will be 1,000,000 EUR + 1,000,000 GBP =
2,010,000 GBP
and the reported "Actual" spend will be 10,000 GBP despite nothing having
been spent.

This reporting bug gets worse the longer gnucash is used.

Thanks,
D

On Sat, Jan 7, 2023 at 9:52 AM ml enquirer <ml.hnel.227484 at gmail.com> wrote:

> Hi Adrien,
>
> Thanks for the mental bandwidth on this. I don't like replying inline, but
> I'm going to grit my teeth and do it here - forgive me!
>
> Cheers,
> D
>
> On Sat, Jan 7, 2023 at 12:47 AM Adrien Monteleone <
> adrien.monteleone at lusfiber.net> wrote:
>
>> 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.
>>
> Great: https://bugs.gnucash.org/show_bug.cgi?id=798716
>
>
>> 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.)
>>
> The pragmatic way around this is to only use budget reports with a single
> budget period when multiple currencies are used in sub-accounts. Things
> then work because the starting "actual" value is always zero.
>
>
>> 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?
>>
> Interesting. Here the budget and the budget report behave differently. The
> roll-up *does* acknowledge the change in FX rate, but behaves as I'd expect
> (see screenshot attached)
>
>>
>> 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.
>>
> Depth was enough to capture all sub-accounts and ranges were sensible (and
> covered all transactions). I admit it is possible to screw this up as you
> warn - and perhaps I still have - but I think I've picked it simply
>
>>
>> Additionally, did you simply manually enter all budget values, or did
>> you perhaps use the Estimate feature?
>>
> Manually entered.
>
>>
>> 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)
>>
> No trading accounts.
>
>>
>> -----
>> 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.
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
>


More information about the gnucash-user mailing list