summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-27 23:58:16 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-27 23:58:16 +0000
commitb5acdeda00c8896793451d2d5323f0abfcddc19c (patch)
treee79f819d867a9c315150e155a9c48b17b360db40 /LedgerSMB
parent3d5ea150c55040ef735b84298f8120f85fb5556d (diff)
Fixing tax rounding issues relating to carried precision of values
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1117 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Form.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 107a4e1d..47f117f7 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -571,6 +571,9 @@ sub round_amount {
$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;
}