Bug 486466

Summary: Price update of a share is not saved
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.2
Sentry Crash Report:
Attachments: test case

Description Ralf Habacker 2024-05-02 17:27:34 UTC
Created attachment 169110 [details]
test case

STEPS TO REPRODUCE
1. build kmymoney from git master branch or download a kmymoney snapshot from git master branch
2. start kmymoney 
3. open appended test case
4. open settings and select "online quotes"
5. install "Yahoo.com [Equities]"
6. duplicate the installed source and rename the copy to "Yahoo Finance"
7. save and close settings
8. select menu entry "Extra"->"Update stock and currencies"
9. press "Update all"
10. Inspect the price column - it shows "43,38 BHP.AX"
11. close and reopen the same dialog from 8. 
12. Inspect the price column - it shows a different value -"0,02 $"

OBSERVED RESULT
the value shown in the price column at 10. and 12. are incorrect

EXPECTED RESULT
In the price column shown at 10. it should be "43,38 AUD"

SOFTWARE/OS VERSIONS
Linux: openSUSE Leap 15.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 Thomas Baumgart 2024-05-04 11:59:13 UTC
Git commit 84cbad070abf76a45808c90ce480378ef96aa679 by Thomas Baumgart.
Committed on 04/05/2024 at 11:58.
Pushed by tbaumgart into branch 'master'.

Correct extraction of price information for investments

The extraction for price information of securities was interpreted in
the wrong way. From and To values were exchanged. Also, the price
precision was not determined correctly.
FIXED-IN: 5.2

M  +11   -7    kmymoney/dialogs/kequitypriceupdatedlg.cpp

https://invent.kde.org/office/kmymoney/-/commit/84cbad070abf76a45808c90ce480378ef96aa679