[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1117] trunk/LedgerSMB/Form.pm



Revision: 1117
          http://svn.sourceforge.net/ledger-smb/?rev=1117&view=rev
Author:   einhverfr
Date:     2007-04-27 16:58:16 -0700 (Fri, 27 Apr 2007)

Log Message:
-----------
Fixing tax rounding issues relating to carried precision of values

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-04-27 23:55:45 UTC (rev 1116)
+++ trunk/LedgerSMB/Form.pm	2007-04-27 23:58:16 UTC (rev 1117)
@@ -571,6 +571,9 @@
     $amount = Math::BigFloat->new($amount)->ffround( -( $places - 1 ) )
       if $places < 0;
 
+    $amount->precision(undef); #we are assuming whole cents so do not round
+                               #immediately on arithmatic
+
     return $amount;
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.