Bug 498401

Summary: Incorrect price output in "Show transaction details" dialog for "add/remove shares" investment transactions
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.1.90   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot showing the issue

Description Ralf Habacker 2025-01-08 22:33:00 UTC
Created attachment 177213 [details]
Screenshot showing the issue

The attached test file shows an error in the output of prices for investment transactions of the type ‘Add/Remove shares’.

STEPS TO REPRODUCE
1. open the attached file, with a snapshot of kmymoney
2. configure a keyboard shortcut for the function ‘Show transaction details’ e.g. CTRL-SHIFT-D
2. open the general ledger of the account Assets->shares->BHP
3. select the transaction ‘Add shares’ and press CTRL-SHIFT-D

OBSERVED RESULT
The attribute ‘Price’ in the displayed transactions shows ‘1/1’

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 Jack 2025-01-09 00:08:47 UTC
From what I understand, this is not a display issue, as that (1/1) is the value actually stored in the transaction.  Is the answer to explicitly test for this type of transaction and display 0 or to change what is stored in such transactions.