Bug 350904 - Net worth currency not updated when changing the base currency
Summary: Net worth currency not updated when changing the base currency
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.6
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-03 05:23 UTC by Francois Marier
Modified: 2021-03-21 10:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.2
Sentry Crash Report:


Attachments
Screenshot of the home screen after running through the steps (179.94 KB, image/png)
2015-08-03 05:24 UTC, Francois Marier
Details
Simple KMyMoney file demonstrating the problem (4.32 KB, application/x-kmymoney)
2015-08-03 05:24 UTC, Francois Marier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Marier 2015-08-03 05:23:18 UTC
Setting a new base currency doesn't force the net worth display on the home "tab" to be recomputed in the new currency.

Reproducible: Always

Steps to Reproduce:
1. Create a new file with EUR as the base currency.
2. Create a new "EUR Account" checking account with EUR as the currency and an initial balance of 10 EUR.
3. Create a new "USD Account" checking account with USD as the currency and an initial balance of 10 USD (exchange rate of 2 USD to 1 EUR).
4. Look at the Net Worth amount on the Home screen and notice that it's 15 EUR.
5. Change the base currency to USD.
6. Go to Accounts, then back to Home.
7. Look at the Net Worth.

Actual Results:  
It's still showing up as 15 EUR as per the attached screenshot.

Expected Results:  
It should be showing up as 30 USD.

If you save, close the file and then re-open it, it shows up correctly as 30 USD.
Comment 1 Francois Marier 2015-08-03 05:24:02 UTC
Created attachment 93855 [details]
Screenshot of the home screen after running through the steps
Comment 2 Francois Marier 2015-08-03 05:24:40 UTC
Created attachment 93856 [details]
Simple KMyMoney file demonstrating the problem

I have attached a simple file which demonstrates this problem. All you need
to do is open it, change the base currency and then look at the Net Worth.
Comment 3 Justin Zobel 2021-03-10 00:16:16 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 4 Francois Marier 2021-03-21 03:49:38 UTC
This bug is still valid in 5.1.1.

Steps:
1. download the second attachment
2. go into Tools | Currencies
3. set the base currency to USD
4. look at the net worth on the main tab

Actual:

It's still displayed as 15 EUR.

Expected:

The net worth should be displayed as 30 USD.
Comment 5 Francois Marier 2021-03-21 03:50:29 UTC
Note that the net worth IS displayed correctly once one closes the file and then reopens it. So it's probably just a matter of refreshing the info on the main tab after a change of currency.
Comment 6 Thomas Baumgart 2021-03-21 10:05:59 UTC
Git commit a832896639b72b1387ac18e4b4d718d7601401e8 by Thomas Baumgart.
Committed on 21/03/2021 at 09:16.
Pushed by tbaumgart into branch '5.1'.

Emit notification when base currency changes
FIXED-IN: 5.1.2

M  +1    -0    kmymoney/mymoney/mymoneyfile.cpp

https://invent.kde.org/office/kmymoney/commit/a832896639b72b1387ac18e4b4d718d7601401e8
Comment 7 Thomas Baumgart 2021-03-21 10:06:21 UTC
Git commit 5dbdbd82e2412fdb23523898209f6028ab0e5e28 by Thomas Baumgart.
Committed on 21/03/2021 at 10:03.
Pushed by tbaumgart into branch 'master'.

Emit notification when base currency changes

M  +1    -0    kmymoney/mymoney/mymoneyenums.h
M  +2    -0    kmymoney/mymoney/mymoneyfile.cpp

https://invent.kde.org/office/kmymoney/commit/5dbdbd82e2412fdb23523898209f6028ab0e5e28