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.



On Thu, Jan 5, 2023 at 9:37 PM ml enquirer <ml.hnel.227...@gmail.com> wrote:

> Hi!
>
> Any clues as to where to start to understand this odd budget report
> behaviour? Browsing the code, I wondered if I should start pulling the code
> apart here:
>
> https://github.com/Gnucash/gnucash/blob/master/gnucash/gnome/gnc-budget-view.c#L1011
>
> to understand why the totals would be combined in such an
> apparently-illogical (but presumably profoundly reasonable to a
> better-informed person!) way...
>
> Hints very much appreciated!
>
> On Mon, Jan 2, 2023 at 4:10 PM ml enquirer <ml.hnel.227...@gmail.com>
> wrote:
>
>> Dear all,
>>
>> I spend in two currencies and, historically, I chose to create separate
>> accounts under each expense line for each currency. In future I will do
>> this differently, employing trading accounts, but what I'm about to
>> describe should still work. I budget in my 'home' currency, and the budget
>> report would combine the "sub-spends" in each currency (using the price
>> database).
>>
>> However, the "Actual" budget totals don't behave as I expected. I've set
>> up a simple scenario to explain:
>> 1) I set up an assets and expense ("Groceries") account
>> Under each I set up a "GBP" and a "EUR" account
>> 3) On 1st Jan of 2020, 2021, 2022, 2023 I spend 10,000 EUR and 10,000 GBP
>> on "Groceries"
>> 4) I set up the price database with four entries, on 1st Jan:
>>  - 1/1/2020 1GBP = 1EUR
>>  - 1/1/2021 1GBP = 2EUR
>>  - 1/1/2022 1GBP = 1EUR
>>
>> I've attached a simple reproducer ("bugreport.gnucash", though perhaps
>> this is not a bug so filename might be inappropriate!).
>>
>> When I look at the default budget report, I see that the total per year
>> is always 10,000 of each currency in the sub-accounts, as expected, but the
>> budget's "Act" total under "Groceries" is:
>> 1/1/2020: £15,000 [I expect £20,000 because EUR=GBP on 1/1/20]
>> 1/1/2021: £15,000 [I expect £15,000 because 1EUR=0.5GBP on 1/1/21]
>> 1/1/2022: £30,000 [I expect £20,000 because 1EUR=1GBP on 1/1/22]
>> 1/1/2023: £20,000 [I expect £20,000 because 1EUR=1GBP on 1/1/23]
>>
>> Can someone explain where my naive expectation is wrong? Is GnuCash doing
>> some strange interpolation between exchange rate values?
>>
>> Many thanks in advance.
>>
>>
_______________________________________________
gnucash-user mailing list
gnucash-user@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.

Reply via email to