summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
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) {