[Kmymoney-devel] Bug# 294268- Investment prices have only two decimal places on reports

Thomas Baumgart thb at net-bembel.de
Wed Jan 15 18:46:29 UTC 2014


Hi,

On Wednesday 15 January 2014 21:17:29 Abhijeet Nikam wrote:

> Hi,
> 
> This is my first bug, so could you please elaborate on the way to proceed
> from here on?
> 
> 
> MyMoneySecurity::smallestFraction() will return the fractional part of
> investment?

It's called MyMoneySecurity::smallestAccountFraction()

> Only the reports and charts precision has to be fixed.

Most likely.

> So I should extract the fraction part of the investment and use it to set
> the precision for graphs and all the reports specifications in investment?

Sounds like a plan to me.

> In which class does the actual precision conversion takes place from the
> investment input? Is it the the mymoneymoney.cpp source file?

Sort of. The output conversion is handled in MyMoneyMoney::formatMoney(). The 
precision is passed as a parameter. This is overridden by 
PivotCell::formatMoney(). A good point could be to add a unit test with a 
precision other than 2 and check to get that running.

I am not sure which way the resp. report is generated, but doing a 'grep 
formatMoney *.cpp' in reports shows a bunch of locations where this is used. 
It seems that the precision is already passed as argument.

Hope that is some information to get started.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
With every day I come closer to the grave and learn something new.
It all happens because I have wandered around too much and stumbled into
the Linux world - which is a fantastic place to be! (Algis Kabaila)
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20140115/91cd5473/attachment.sig>


More information about the KMyMoney-devel mailing list