Bug 365133

Summary: Consistency check failure: currency of a category has no price set for 1900-01-01
Product: [Applications] kmymoney Reporter: Brendon Higgins <brendon>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: mark, ralf.habacker
Priority: NOR    
Version: 4.8.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1,5.0.0
Sentry Crash Report:

Description Brendon Higgins 2016-07-06 02:18:30 UTC
Until a few years ago I was using Australian dollars as my only currency, but then I moved overseas. I changed my base currency to suit, though all the categories seem to continue to have a currency of AUD, and there's apparently no way to change that. (I've gotten used to the currency conversion dialog nagging me every time I enter a transaction, but I still question the sense of categories having currencies associated with them at all.)

After recently updating to 4.8, while saving my budget today a consistency check window came up, stating that "The account 'Food out' in currency 'Australian Dollar' has no price set for the opening date '1900-01-01'." ("Food out" is one of categories.)

I had no idea categories have opening dates. I can't seem to find this opening date shown anywhere in the UI (it's not in the "Edit category..." dialog), let alone correct it to something more sensible. I don't understand why KMyMoney's consistency check should even want this, nor why it's complaining about "Food out" specifically as opposed to any other categories.

I guess (haven't yet tried) a workaround is to enter some value for AUD at 1900-01-01. (Although, technically, the Australian dollar didn't even exist back then...)

Reproducible: Always
Comment 1 Mark 2016-12-23 22:34:56 UTC
I have a fix for this bug but I am concerned about potential side-effects. My fix is to exclude accounts of type IncomeExpense from the consistency check for missing prices on the opening date (mymoneyfile.cpp:2337). 

Is there any reason that a IncomeExpense category in a foreign (non-base) currency would require a price on the 'fake' account opening date of 1900-01-01? If not, I'll submit a review request.
Comment 2 Thomas Baumgart 2016-12-24 12:06:59 UTC
I currently don't see a problem with the proposed fix and don't expect any side-effects either. So please go ahead and submit your review request.
Comment 3 Albert Astals Cid 2017-01-21 00:17:30 UTC
Git commit 5ee94f58c7b43e5640bacce754c1e7a6720c7c5f by Albert Astals Cid, on behalf of Mark Jones.
Committed on 21/01/2017 at 00:16.
Pushed by aacid into branch '4.8'.

Exclude IncomeExpense categories from opening date price consistency check
REVIEW: 129702

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

https://commits.kde.org/kmymoney/5ee94f58c7b43e5640bacce754c1e7a6720c7c5f
Comment 4 Albert Astals Cid 2017-01-21 00:19:56 UTC
Git commit 365c0f4fa75a291ff7447123cd0ca7b10c41f2bd by Albert Astals Cid, on behalf of Mark Jones.
Committed on 21/01/2017 at 00:19.
Pushed by aacid into branch 'master'.

Exclude IncomeExpense categories from opening date price consistency check
REVIEW: 129702

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

https://commits.kde.org/kmymoney/365c0f4fa75a291ff7447123cd0ca7b10c41f2bd