From cdc129fc7451af5140c36f2ab084a81b997296ba Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 27 Apr 2007 23:55:45 +0000 Subject: Fixing tax rounding issues relating to carried precision of values git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1116 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LedgerSMB/Form.pm') diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index f0a581cd..a53668b1 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -554,7 +554,6 @@ sub parse_amount { my $decimalplaces = length $1 + length $2; $amount = new Math::BigFloat($amount); - #$amount->accuracy($decimalplaces); return ( $amount * 1 ); } @@ -571,6 +570,7 @@ sub round_amount { $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; } -- cgit v1.2.3