From 9263554936de0058ff5cef43dfbf2d5829a03ca6 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 10 Jul 2008 19:32:46 +0000 Subject: Committing David Mora's rounding fix. May require new lines in ledgersmb.conf for those testing. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2207 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'LedgerSMB.pm') diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 1ea5e63c..cf480bd4 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -521,7 +521,14 @@ sub parse_amount { sub round_amount { my ( $self, $amount, $places ) = @_; - + + # + # We will grab the default value, if it isnt defined + # + if (!$places){ + $places = ${LedgerSMB::Sysconfig::decimal_places}; + } + # These rounding rules follow from the previous implementation. # They should be changed to allow different rules for different accounts. if ($amount >= 0) { -- cgit v1.2.3