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

Alvaro Soliverez asoliverez at kde.org
Fri Jan 17 19:28:32 UTC 2014


Hello Abhijeet,
Rendering prices depends on the specific report.
As this is about investments, it's most likely the Investment
Performance report.

For that, you may want to look at querytable.cpp:constructPerformanceRow()

Again, it depends on the specific, but that's a good start.

Sorry for the delay. I wanted to reply sooner, but there's a heat wave
here with power outages. My life has been messier than normal the last
days.

Regards,
Alvaro

On Wed, Jan 15, 2014 at 4:21 PM, Abhijeet Nikam
<connect08nikam at gmail.com> wrote:
> Hi,
>
> Thank you for the information and the specific reply. I'll start working on
> it and try making some basic changes to the precision in reports and trace
> the functions used in it.
>
> Regards,
> Abhijeet
>
>
> On Thu, Jan 16, 2014 at 12:16 AM, Thomas Baumgart <thb at net-bembel.de> wrote:
>>
>> 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)
>> -------------------------------------------------------------
>>
>> _______________________________________________
>> KMyMoney-devel mailing list
>> KMyMoney-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>>
>
>
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>


More information about the KMyMoney-devel mailing list