[Kmymoney-devel] Re: Review Request: Show prices in investment reports only if they exist
Bernd Gonsior
bernd.gonsior at googlemail.com
Wed Sep 29 12:05:58 CEST 2010
Alvaro Soliverez schrieb am 26.09.2010 05:20
> > 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#file35571lin
> > > e2330>
> > >
> > > if the method in ReportAccount works, you can drop this.
> >
> > Bernd Gonsior wrote:
> > 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.
>
> price reports, which is where this is going to be used, are daily. That's
> how it works now, and there is no need to change that.
When using report "Investment Price Graph" in the report configuration
"Rows/Columns" -> "Columns" is preset to "Daily". But the user can choose any
other period as well (Weekly, Monthly, ...). If another period then "Daily" is
choosen, data loss can occur because ReportAccount::deepCurrencyPrice is
called only for the last day of a period. Prices with another date will not be
read. That's something to avoid. For that purpose i implemented
ReportAccount::periodHasPrice. Do you have another proposal to avoid such
possible data loss?
Regards, Bernd
More information about the KMyMoney-devel
mailing list