Bug 294268

Summary: Investment prices have only two decimal places on reports
Product: [Applications] kmymoney Reporter: David Houlden <djhoulden>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: onet.cristian, ralf.habacker, sakshi.april5
Priority: NOR Keywords: junior-jobs
Version: git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.0

Description David Houlden 2012-02-16 21:39:15 UTC
Version:           git master (using KDE 4.6.5) 
OS:                Linux

I have some shares in an investment account which have prices to four decimal places (1/100 of a penny). On the investment price reports and charts the prices are rounded to the nearest penny. e.g a share with a price of 0.0455 GBP is shown as 0.05 which overstates the price by about 10%. A share price movement from 0.0440 to 0.0460 appears on the graph as a change from 0.04 to 0.05 which overstates the price movement.

Reproducible: Always

Steps to Reproduce:
See details.

Actual Results:  
Prices on charts and investment reports are shown to two decimal places even if they are stored to four decimal places.

Expected Results:  
Prices should be displayed to the number of decimal places stored.
Comment 1 Alvaro Soliverez 2014-01-14 11:16:28 UTC
Did you set the Precision in KMyMoney settings?
Comment 2 David Houlden 2014-01-14 20:42:10 UTC
Price precision is set to 4 digits.
Comment 3 sakshi.april5 2014-03-25 12:16:09 UTC
Hello,

I am a beginner and would like to work on this bug.
Comment 4 NSLW 2017-02-18 13:08:11 UTC
Git commit b5f71bc3677ee6f7948fdcd02d938179c2c60949 by Łukasz Wojniłowicz.
Committed on 18/02/2017 at 13:06.
Pushed by wojnilowicz into branch 'master'.

Use price precision setting on investment prices report

Differential Revision: https://phabricator.kde.org/D4656

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

M  +3    -3    kmymoney/reports/kreportchartview.cpp
M  +5    -0    kmymoney/reports/pivottable.cpp
M  +2    -1    kmymoney/reports/pivottable.h

https://commits.kde.org/kmymoney/b5f71bc3677ee6f7948fdcd02d938179c2c60949