>>>>> 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.

>       - 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.

>       - 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.

John

-- 

--- 
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