Bug 461294 - Account opened before 2000 : blocking message when entering an operation with a date like year = 199x
Summary: Account opened before 2000 : blocking message when entering an operation with...
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-01 18:23 UTC by Benoit
Modified: 2022-11-01 22:05 UTC (History)
1 user (show)

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


Attachments
Screen shot showing the operation date in RED and the date of the account creation (81.78 KB, image/jpeg)
2022-11-01 18:23 UTC, Benoit
Details
kmymoney example file (30.44 KB, text/xml)
2022-11-01 21:44 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
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.