Changeset - fa0755e4b502
[Not reviewed]
0 2 0
tripun - 10 years ago 2014-06-20 09:36:36
tripun@gmail.com
updated solution
2 files changed with 11 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rounding/proposal.md
Show inline comments
...
 
@@ -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
rounding/solution.md
Show inline comments
 
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
0 comments (0 inline, 0 general)