[Kmymoney-devel] Bug# 294268- Investment prices have only two decimal places on reports
Abhijeet Nikam
connect08nikam at gmail.com
Fri Jan 17 20:16:01 UTC 2014
Thanks for the guidance. I'll definitely take a look at that file now.
Yesterday while going through the conversion patterns for precision and
usage of smallestAccountFraction() function, I found that the default value
returned by smallestAccountFraction() is such that we get two decimal
precision in the output. Please do correct me if my understanding is wrong.
The KBalanceaxis can be corrected first if we get the entered fractions by
the user for investments and directly assign it to the precision value in
the customizedLabel function.
My doubt is, where is the users input value for investment directly getting
stored?
I am presently going through the kmymoney api docs on sourceforge to gain a
more deeper understanding on the relationships between the reports and
other classes for conversion.
Take care,
Regards,
Abhijeet
On Sat, Jan 18, 2014 at 12:58 AM, Alvaro Soliverez <asoliverez at kde.org>wrote:
> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20140118/b82ec8e3/attachment-0001.html>
More information about the KMyMoney-devel
mailing list