summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-10 19:32:46 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-10 19:32:46 +0000
commit9263554936de0058ff5cef43dfbf2d5829a03ca6 (patch)
treefb5c0fbb26151dfc81f248aa104194a187103804 /LedgerSMB.pm
parent0befab1e5e83dd62b039df033a53b86fc96d2a0c (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-xLedgerSMB.pm9
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) {