Bug 359695

Summary: New file, new bank account, first operation : old date is invalid
Product: [Applications] kmymoney Reporter: Philippe Debrabant <debrabant.philippe>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: debrabant.philippe
Priority: NOR    
Version: 4.7.2   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Philippe Debrabant 2016-02-23 08:53:30 UTC
Hello,
I created a new file and the first account. The open date is 03/04/2014 (it is the french format jj/mm/aaaa).
I entered the first operation for the date of 08/04/2014 with the "Bonus" category. The date turned red and I couldn't register the operation.
Valid date begins today : 23/02/2016 !
It's disturbing.

I found the solution : I set the account balance to 0, next I can register my operation. Curiously, if I edit the account next, there's no value in the balance input field.

When I saved the file, I got the message : 
"* Transaction 'T000000000000000001' post date '2014-04-08' is older than opening date '2016-02-23' of account 'Bonus'.
    Account opening date updated.

Terminé : 1 problème corrigé. 0 problème encore présent."

In fact, it is the category's account opening date, the problem. The file is new and the categories' accounts are created automatically with the date of the day : 23/02/2016. But they should take the same open date of the operation if its date is anterior.

Reproducible: Didn't try

Steps to Reproduce:
1.New file with new account (general) with an opening date = 03/04/2014
2.New operation with the date = 08/04/2014


Actual Results:  
Operation date turns red and I can't register my operation.

Expected Results:  
Operation date don't turn red and I can register my operation.
Comment 1 Philippe Debrabant 2016-02-23 11:10:50 UTC
I added another account and wanted to create a transfer from the first account to the second.
Th operation date turned red.
I close and re-open KMyMoney and this time I could create the operation.
Comment 2 Thomas Baumgart 2016-02-26 12:47:27 UTC
The problems around the account opening date esp. with categories have been addressed in master already. So these problems are already fixed in the current development version. See #313793 at https://bugs.kde.org/show_bug.cgi?id=313793#c41 for more details. So I mark this as a duplicate to it.

*** This bug has been marked as a duplicate of bug 313793 ***