Bug 401144 - Price in exponential format is not interpreted correctly
Summary: Price in exponential format is not interpreted correctly
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.2
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-17 19:36 UTC by Thomas Baumgart
Modified: 2018-11-18 08:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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"