Bug 498356

Summary: Incorrect price information in the kmymoney file for the investment transaction “add/remove shares”
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: fileAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: ASSIGNED ---    
Severity: normal    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 498033    
Attachments: test file

Description Ralf Habacker 2025-01-07 15:37:55 UTC
Created attachment 177172 [details]
test file

On https://bugs.kde.org/show_bug.cgi?id=498033#c12 it has been found that adding or removing shares to or from an investment account results in incorrect price information in the subsequently saved kmymoney file.

STEPS TO REPRODUCE
1. open the attached file created by a recent kmymoney snapshot from the git master branch in an editor and review the transaction with id=“T000000000000000008” or id=“T000000000000000009”.

OBSERVED RESULT
The “Price” attribute in the mentioned transactions shows “1/1”, resulting in an incorrect investment transaction report (originally reported under bug 498033).

EXPECTED RESULT
The price attribute for the named transaction in the file should be “0/1”. 

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Comment 1 Bug Janitor Service 2025-01-07 16:28:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/256