diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-10 19:32:46 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-07-10 19:32:46 +0000 |
commit | 9263554936de0058ff5cef43dfbf2d5829a03ca6 (patch) | |
tree | fb5c0fbb26151dfc81f248aa104194a187103804 /LedgerSMB.pm | |
parent | 0befab1e5e83dd62b039df033a53b86fc96d2a0c (diff) |
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
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-x | LedgerSMB.pm | 9 |
1 files changed, 8 insertions, 1 deletions
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) { |