[Kmymoney-devel] focus order in budget view and other issues

Alvaro Soliverez asoliverez at gmail.com
Mon Nov 16 16:02:41 CET 2009


On Mon, Nov 16, 2009 at 11:41 AM, Cristian Oneţ <onet.cristian at gmail.com>wrote:

> 2009/11/16 Alvaro Soliverez <asoliverez at gmail.com>:
> >
> >
> > On Sun, Nov 15, 2009 at 5:10 PM, Cristian Oneţ <onet.cristian at gmail.com>
> > wrote:
> >>
> >> În data de Sîmbătă 14 Noiembrie 2009 00:38:28 Alvaro Soliverez a scris:
> >>
> >> > >> Another issue I've just found is the difference between the budget
> >> > >> and
> >> > >> the budget report. For example I've allocated 1000 for a category
> in
> >> > >> the
> >> > >> budget
> >> > >> view and in the 'Actual vs. budget' report I only see 999,96
> >> > >> allocated
> >> > >> for that category.
> >> > >
> >> > > I will check this too, since reports are my area. It seems to be a
> >> > > severe
> >> > > case of rounding.
> >> >
> >> > Check the price for the 1st day of the month, or the next price
> >> > available
> >> > prior to that.
> >> I don't think that it has anything to do with prices. I could be wrong
> but
> >> maybe the following thing happens:
> >> I allocate for an expense category 1000 RON. This is computed in the
> >> reports
> >> as a monthly 83,33 (this is a displayed value, the actual value should
> be
> >> 83,
> >> (3) or 83,3333333 endlesly). When 12 months of 83,33 is sumed up 999,96
> >> results.
> >>
> >
> > In this case, it is a severe case of rounding.
> >
> > To display on reports, the annual budget is divided by 12 and rounded.
> Then,
> > if a total column is displayed, the columns are summed up, and rounded.
> So,
> > for those cases there will be a difference. Keep in mind that the total
> > column might for a different number of months than the budget, eg. the 3
> > next months or so.
> >
> > What I could do in these cases is rounding the number to decimal places +
> 1.
> > That would avoid most problems but the most severe cases.
> I didn't take a look a the code so sorry if my suggestion is out of
> line. So here it is: Couldn't this be solved if each report cell value
> is a MyMoneyMoney object?
> Or they are already MyMoneyMoney objects and case the rounding themselves?
>

They are MyMoneyMoney objects and they are rounded when the budget is
calculated into the cells (different periods, currencies, and so on, make it
a not so straightforward process to display the budget).

And you do have to round them when dealing with multiple currencies because
of overflow issues. The denom starts growing very quickly and you end up
very quickly with a nonsense number like -3.123412341234   :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20091116/5cb06ddd/attachment.htm 


More information about the KMyMoney-devel mailing list