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

SF.net SVN: ledger-smb: [1116] branches/1.2/LedgerSMB/Form.pm



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

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

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-04-27 22:18:44 UTC (rev 1115)
+++ branches/1.2/LedgerSMB/Form.pm	2007-04-27 23:55:45 UTC (rev 1116)
@@ -554,7 +554,6 @@
     my $decimalplaces = length $1 + length $2;
 
     $amount = new Math::BigFloat($amount);
-    #$amount->accuracy($decimalplaces);
 
     return ( $amount * 1 );
 }
@@ -571,6 +570,7 @@
     $amount = Math::BigFloat->new($amount)->ffround( -$places ) if $places >= 0;
     $amount = Math::BigFloat->new($amount)->ffround( -( $places - 1 ) )
       if $places < 0;
+    $amount->precision(undef);
 
     return $amount;
 }


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