On Fri, Jul 25, 2014 at 12:50 AM, John Wiegley <[email protected]>
wrote:

> >>>>> tripun goel <[email protected]> writes:
>
> >     Now, where can rounding come into play here?  There are several
> places:
>
> >       - Round postings with extra precision right away.
>
> > not required, purpose is to maintain as much precision we can.
>
> Actually, this has value.  People who do time accounting for ledger, for
> example a lawyer who bills his clients, will want to round up to the
> nearest
> hour at the posting level.
>

Well this is a new perspective. I think at all places where rounding is not
required for monetary purpose, a flag can be added which when set will
round at that place too. for example , at the posting level as you said.


>
> >       - Round after multiplying the cost by the quantity
>
> > This is required. Practically, transactions rounded to two places after
> > decimal are common. For example , 2012-01-01 *    A
>    1
> > AAA @@ 10.123 EUR    C   C should reflect 10.12 EUR  in balance. Please
> > correct if you meant differently.
>
> OK, I can certainly see this as an option.
>
> >       - Round after multiplying the present value by the quantity
>
> > This is to be avoided, for simple reason that the rounding error will
> > reflect in the total.
>
> Again, there may be non-monetary scenarios where this is desired.
>

Again, a flag can be added and set if this is required.


>
> >       - Round the account total after summing the rationals internally.
>
> > Not exactly the total but whenever postings related to one commodity are
> > summed, its subtotal should be rounded. Please correct me if I am wrong.
>
> Since account balances use balance_t, postings are always summed according
> to
> their commodity.  This is why I remain mystified that sorting has entered
> the
> discussion.
>
> ah, I see !! this has been the point of contention, when we use valuation
, all those commodities are exchanged with one single primary commodity
before being actually added. So, it does not maintain the balance per
commodity if you valuate. The order in which they are added is the order of
parsing. If you do not valuate then it will add the quantities according to
their respective commodities.

Tripun

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to