summaryrefslogtreecommitdiff
path: root/LedgerSMB/Form.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-27 23:55:45 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-27 23:55:45 +0000
commitcdc129fc7451af5140c36f2ab084a81b997296ba (patch)
tree29bf394444dc72cce08d4c40ad59fc968bd86884 /LedgerSMB/Form.pm
parentb68dfa0dcfa0232d8da8240749a287ed48859fbc (diff)
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
Diffstat (limited to 'LedgerSMB/Form.pm')
-rwxr-xr-xLedgerSMB/Form.pm2
1 files changed, 1 insertions, 1 deletions
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;
}