X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/f575aa99b38c34c64deff0abfb87d820eca923dd..cf3bfc270056e67b6ce0d5d152f0d7718ddb81f1:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index a0fa96a2c..c5a30bf78 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -519,6 +519,12 @@ sub format_amount { $main::lxdebug->enter_sub(); my ($self, $myconfig, $amount, $places, $dash) = @_; + + #Workaround for $format_amount calls without $places + if (!defined $places){ + (my $dec) = ($amount =~ /\.(\d+)/); + $places = length $dec; + } if ($places =~ /\d/) { $amount = $self->round_amount($amount, $places);