Re: [GNC] Budget report fails in multiple currencies

2023-01-09 Thread ml enquirer
Here is a pull request that demonstrates a "better" handling of the exchange. Basically, conversion to the report currency should happen *after* the balance change has been computed, not before. If it happens before, it makes the historical, cumulative total's exchange-rate fluctuation during the

Re: [GNC] Budget report fails in multiple currencies

2023-01-08 Thread ml enquirer
Yes, it's cumulative, which is a problem I think. Let: 0 indicate the opening of the book 1 indicate the start of the budget period in question 2 indicate the end of that period S_i indicates the sum of transactions since 0 at marker i, in the currency of the sub-account P_i indicates the sum of

Re: [GNC] Budget report fails in multiple currencies

2023-01-07 Thread Adrien Monteleone
As long as the change in value isn't cumulative, I would want to know. If I wanted to budget the same 'purchasing power' as last period/year, I would not want to budget the exact same nominal amount. (on that note, a feature to factor inflation for budgets would be swell!) But I do

Re: [GNC] Budget report fails in multiple currencies

2023-01-07 Thread ml enquirer
Hi Fred, Thanks for the thought! I agree the change in value is 10,000. My point is, basically, that I don't care about currency fluctuations in money already spent when planning *next* year's budget. But the 'problem' (which might just be that I need someone to explain what a 'budget' is!) is

Re: [GNC] Budget report fails in multiple currencies

2023-01-07 Thread Fred Bone
On 07 January 2023 at 10:21, ml enquirer said: > 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.

Re: [GNC] Budget report fails in multiple currencies

2023-01-07 Thread ml enquirer
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

Re: [GNC] Budget report fails in multiple currencies

2023-01-07 Thread ml enquirer
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.montele...@lusfiber.net> wrote: > Christopher Lamm had been working on various

Re: [GNC] Budget report fails in multiple currencies

2023-01-06 Thread Adrien Monteleone
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

Re: [GNC] Budget report fails in multiple currencies

2023-01-06 Thread ml enquirer
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

Re: [GNC] Budget report fails in multiple currencies

2023-01-05 Thread ml enquirer
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

[GNC] Budget report fails in multiple currencies

2023-01-02 Thread ml enquirer
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