[Kmymoney-devel] Review Request: Show prices in investment reports only if they exist
Bernd Gonsior
bernd.gonsior at googlemail.com
Thu Sep 23 21:17:28 CEST 2010
> On 2010-09-10 02:57:38, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/reports/pivottable.cpp, line 1028
> > <http://svn.reviewboard.kde.org/r/5298/diff/1/?file=35571#file35571line1028>
> >
> > This is the call you should modify to fetch prices for the exact date, if a flag is set in the config of the report (say config.skipZero)
> >
> > In line 109 of reportaccount.cpp, the call should be
> > MyMoneyPrice price = file->price(undersecurity.id(), undersecurity.tradingCurrency(), date, <new parameter>);
> >
> > That should return zero if exactDate, the last parameter, is set to true.
>
> Alvaro Soliverez wrote:
> Check if MyMoneyPrice.isValid(), set the conversionFactor to zero if false.
The call is changed.
> On 2010-09-10 02:57:38, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/reports/pivottable.cpp, line 1048
> > <http://svn.reviewboard.kde.org/r/5298/diff/1/?file=35571#file35571line1048>
> >
> > That shouldn't depend on the type of the account, but on a config for the report
Using config now.
> On 2010-09-10 02:57:38, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/reports/pivottable.cpp, line 2330
> > <http://svn.reviewboard.kde.org/r/5298/diff/1/?file=35571#file35571line2330>
> >
> > if the method in ReportAccount works, you can drop this.
There is a problem: method ReportAccount::deepCurrencyPrice is called only once for a period (e.g. a month) from PivotTable::convertToDeepCurrency. To retrieve prices which are not exactly at the last day of the current period (that way the call was done so far) this new method has to iterate over all possible dates from start to end of period.
- Bernd
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5298/#review7510
-----------------------------------------------------------
On 2010-09-23 19:17:13, Bernd Gonsior wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5298/
> -----------------------------------------------------------
>
> (Updated 2010-09-23 19:17:13)
>
>
> Review request for kmymoney.
>
>
> Summary
> -------
>
> Patch for investment reports only: prices are shown only if at least one price
> exists in a requested period.
>
>
> Diffs
> -----
>
> /trunk/extragear/office/kmymoney/kmymoney/dialogs/kreportconfigurationfilterdlg.cpp 1178669
> /trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneyreport.h 1178669
> /trunk/extragear/office/kmymoney/kmymoney/mymoney/mymoneyreport.cpp 1178669
> /trunk/extragear/office/kmymoney/kmymoney/reports/kreportchartview.cpp 1178669
> /trunk/extragear/office/kmymoney/kmymoney/reports/pivottable.cpp 1178669
> /trunk/extragear/office/kmymoney/kmymoney/reports/reportaccount.h 1178669
> /trunk/extragear/office/kmymoney/kmymoney/reports/reportaccount.cpp 1178669
> /trunk/extragear/office/kmymoney/kmymoney/widgets/kmymoneyreportconfigtab1decl.ui 1178669
>
> Diff: http://svn.reviewboard.kde.org/r/5298/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bernd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100923/407be60c/attachment-0001.htm
More information about the KMyMoney-devel
mailing list