Bug 401144

Summary: Price in exponential format is not interpreted correctly
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: idest
Priority: NOR    
Version: 5.0.2   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In: 5.0.3

Description Thomas Baumgart 2018-11-17 19:36:16 UTC
SUMMARY

In case an exchange rate is presented as 5.9921e-5 on the price info website it is incorrectly interpreted as 599215.

STEPS TO REPRODUCE
1. Create price for EUR/IDR
2. Run online update of price
3. Observer console output

OBSERVED RESULT

Output on console:
kmymoney_webpricequote: Identifier "IDR/EUR"
kmymoney_webpricequote: Price "599215"
kmymoney_webpricequote: Date "17/11/2018"


EXPECTED RESULT

Output on console:
kmymoney_webpricequote: Identifier "IDR/EUR"
kmymoney_webpricequote: Price "599215"
kmymoney_webpricequote: Date "17/11/2018"
Comment 1 Jack 2018-11-17 21:24:05 UTC
Is that a typo in the Expected Price?
Comment 2 Thomas Baumgart 2018-11-18 08:26:43 UTC
Git commit e3ad0e31ff48336e605263fdbef5e40c0f4550d7 by Thomas Baumgart.
Committed on 18/11/2018 at 07:35.
Pushed by tbaumgart into branch '5.0'.

Support price import in exponential format
FIXED-IN: 5.0.3

M  +13   -2    kmymoney/converter/webpricequote.cpp

https://commits.kde.org/kmymoney/e3ad0e31ff48336e605263fdbef5e40c0f4550d7
Comment 3 Thomas Baumgart 2018-11-18 08:59:34 UTC
(In reply to Jack from comment #1)
> Is that a typo in the Expected Price?

The old copy/paste error struck again :)

It should read

kmymoney_webpricequote: Price "5.9921e-5"