Bug 461294

Summary: Account opened before 2000 : blocking message when entering an operation with a date like year = 199x
Product: [Applications] kmymoney Reporter: Benoit <bchampou>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version First Reported In: 5.1.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screen shot showing the operation date in RED and the date of the account creation
kmymoney example file

Description Benoit 2022-11-01 18:23:02 UTC
Created attachment 153381 [details]
Screen shot showing the operation date in RED and the date of the account creation

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Account create with an initial date 1/1/1996 (type of account = investment )
2. Import QIF file from MS Money into this account
3. Impossible to change an operation dated 10/05/1996 -> blocking message saying date is prior to open date of this account

OBSERVED RESULT
Blocking; no possibility to change/create operations

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: Windows 11
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Benoit 2022-11-01 20:53:21 UTC
Looks like, we need first to save the dbu file  after the account creation.  Then it works.
Comment 2 Ralf Habacker 2022-11-01 21:44:13 UTC
Created attachment 153384 [details]
kmymoney example file

I think you need to create first an equity before you can add transactions to an investment account as shown with the appended test file.
Comment 3 Jack 2022-11-01 22:05:55 UTC
You cannot create a transaction prior to the opening date of the account.  I believe the default opening date for a new account is the first day of the current month.  Because that problem is so common, and it is possible to import a transaction prior to the opening date, the consistency check will sometimes set the opening date of an account to an earlier date that it was.  Since a consistency check is run on saving the data, the is possibly the reason you can add the transactions after saving.  Also, with Ralf's comment - it may have been the opening date of the equity account and not the investment account which caused the problem.