X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/1084d82b1208ac5a0e6f64f67e61fe4163d13e59..999fedbd9ddf7f73d468776559edfcc34f7aafdf:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index 712f655c2..eeb470e70 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -614,6 +614,11 @@ sub round_amount { # Udo Spallek $amount = $amount * (10 ** ($places)); $round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places)); + + do { + $round_amount =~ s/(0|\.)$//g; + $places--; + } while ($places > 0); $main::lxdebug->leave_sub();