summaryrefslogtreecommitdiff
path: root/LedgerSMB/Form.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Form.pm')
-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;
}