Bug 501998 - Warning is displayed when saving the KMyMoney file after entering a transaction for a new investment
Summary: Warning is displayed when saving the KMyMoney file after entering a transacti...
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: git (master)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-25 21:06 UTC by Tony
Modified: 2025-03-26 14:44 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony 2025-03-25 21:06:46 UTC
SUMMARY
I created an investment of type Stock and added a transaction with transaction date before today (the day I created the investment). I entered a Buy transaction of the stock, then I saved the KMyMoney data file. KMyMoney displays the following message in a window. Note that it is not possible to modify the creation date of the investment in the UI, so the warning cannot be avoided. 

* Problems with transactions
  * Transaction 'T000000000000021695' post date '24/03/2025' is older than opening date '%4' of account '25/03/2025'.
    Account opening date updated.
* Potential problem with securities/currencies
  * The security 'Rheinmetall' has no price set for the first use on '24/03/2025'.
    Price for the security has been extracted from transaction and added to price history.

Finished: 2 problems corrected. 0 problems still present.

STEPS TO REPRODUCE
1. Create the stock investment called Rheinmetall (in this case)
2. Enter a buy transaction with transaction date before today.
3. Save the file.

OBSERVED RESULT
The aforementioned warning, which is also incorrectly formatted.

EXPECTED RESULT
No warning.

SOFTWARE/OS VERSIONS
Windows 10

ADDITIONAL INFORMATION
KMyMoney version 5.1.92-bfd5a63 (from the Help/About KMyMoney menu)
KMyMoney master build 4183
Comment 1 Thomas Baumgart 2025-03-26 12:52:55 UTC
Git commit e3e4e4cabe4137a1eef8c98b72d272c10d0a533f by Thomas Baumgart.
Committed on 26/03/2025 at 12:51.
Pushed by tbaumgart into branch 'master'.

Fix parameters to log message

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

https://invent.kde.org/office/kmymoney/-/commit/e3e4e4cabe4137a1eef8c98b72d272c10d0a533f
Comment 2 Thomas Baumgart 2025-03-26 12:55:51 UTC
To change the opening data of an investment go to the accounts view, activate View/Show all accounts and edit the account. The warning shows up exactly once by design. It has been corrected in the meantime.
Comment 3 Ralf Habacker 2025-03-26 13:04:24 UTC
(In reply to Tony from comment #0)
> SUMMARY
...
> * Potential problem with securities/currencies
>   * The security 'Rheinmetall' has no price set for the first use on
> '24/03/2025'.
>     Price for the security has been extracted from transaction and added to
> price history.

Does not adding the price to the history when the transaction is created have an impact on the content of investment reports?
Comment 4 Thomas Baumgart 2025-03-26 14:44:41 UTC
I don't think so, because otherwise you don't have a price at all.