Bug 350903 - Consistency check fails after changing base currency
Summary: Consistency check fails after changing 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:17 UTC by Francois Marier
Modified: 2018-06-06 16:20 UTC (History)
2 users (show)

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


Attachments
Error messsage after doing a consistency check (18.51 KB, image/png)
2015-08-03 05:18 UTC, Francois Marier
Details
Simple KMyMoney file demonstrating the problem (4.38 KB, application/x-kmymoney)
2015-08-03 05:19 UTC, Francois Marier
Details
Result of consistency check with master version and the testfile attached here (42.19 KB, image/png)
2015-08-08 19:50 UTC, Thomas Baumgart
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:17:43 UTC
Changing the base currency leads to consistency check failures because accounts are missing some needed historical exchange rates.

Reproducible: Always

Steps to Reproduce:
Steps to reproduce:

1. Create a new file with EUR as the base currency.
2. Create a new cash account called "Cash Account" in AUD with 2014-01-01 as the opening date and $0 as the opening balance.
3. Add a transaction in that account for 20 AUD on 2015-08-02 with "Meal" as the category.
4. Select "Tools | Consistency Check" and notice it works fine.
5. Set the base currency to USD using "Tools | Currencies".
6. Select "Tools | Consistency Check" and notice it now fails with the attached error message.
Comment 1 Francois Marier 2015-08-03 05:18:15 UTC
Created attachment 93853 [details]
Error messsage after doing a consistency check
Comment 2 Francois Marier 2015-08-03 05:19:09 UTC
Created attachment 93854 [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 run the consistency
check.
Comment 3 Francois Marier 2015-08-03 05:19:29 UTC
The work-around I found is to:

1. Change the base currency to USD.
2. Create a new checking account called "Bank Account" in USD.
3. Open the "Cash Account" settings and set an opening balance of 1 AUD.
4. Edit the "Opening Balances (AUD)" transaction and change it to be a transfer from "Bank Account" to "Cash Account" for 1 AUD with an exchange rate of 0.5 USD to 1 AUD.
5. Select "Tools | Consistency Check" and notice it now works fine.
Comment 4 Thomas Baumgart 2015-08-08 19:48:57 UTC
4.6.6 is rather old. I cannot duplicate this problem with current master. In master, the consistency check had been overhauled, that is probably why.

BTW: the correct fix would be to enter a price for AUD-EUR conversion as suggested by the consistency check warning message.
Comment 5 Thomas Baumgart 2015-08-08 19:50:10 UTC
Created attachment 93951 [details]
Result of consistency check with master version and the testfile attached here
Comment 6 wojnilowicz 2017-07-02 08:57:17 UTC
Marking fixed as per comment #5.