diff --git a/rounding/proposal.md b/rounding/proposal.md index 7eb2646a3e1e9fb24a9b5d4722ff32f99e8884f5..047b9661151b00c28ebec90c8af19f073fabbe6b 100644 --- a/rounding/proposal.md +++ b/rounding/proposal.md @@ -37,6 +37,6 @@ If rounding up was done per transaction, then the error per transaction may add A 1 BBB @$5.52 C -In the above example if there is roundiing up in each transaction then the overall result will be off by more than a dollar. +In the above example if there is rounding up in each transaction then the overall result will be off by few cents. This problem does not occur in ledger as rounding is deffered till the last point that is at the time of display. \ No newline at end of file diff --git a/rounding/solution.md b/rounding/solution.md index 8d1c8b69c3fce7bea45c73efd06983e3c419a92f..09e41ab5ca2d969c9ce2e0b7d3af30da2ae2fd12 100644 --- a/rounding/solution.md +++ b/rounding/solution.md @@ -1 +1,11 @@ +ledger does not round any amount but simply converts it to rational number representation and create rounded amounts only to display in report.Hence, amounts are not rounded until the last moment. But in real world accounting,truncation or rounding takes place after each transaction when calculated amount is rounded to a normally accepted standard. for example,an amount of $41.2334 will be rounded to $41.23 and this will be used in further calculations. A point to note is that we knowingly add truncation or rounding error to ledger if we adopt this method since ledger does not round at all. But this is important to maintain consistency with other accountancy applications, it is good to add an option which will generate a report using this method. This will not change the default behavior until this option is applied. + For example , this posting. +2014/06/18 TEST + A 10 AAA @ 10.1234 EUR + A 10 BBB @ 10.5692 EUR + C +if we set a precision of 2 +this should be calculated as 10*10.1234 = 101.234 rounded to 101.23 and 10*10.5692 rounded to 105.69 and final result is 101.23+105.69=206.92 EUR debited from C. + +Let us add a sub-directive precision to commodity directive which will round per transaction when applied. \ No newline at end of file