From b5acdeda00c8896793451d2d5323f0abfcddc19c Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 27 Apr 2007 23:58:16 +0000 Subject: 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 --- LedgerSMB/Form.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'LedgerSMB/Form.pm') 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; } -- cgit v1.2.3