From 999fedbd9ddf7f73d468776559edfcc34f7aafdf Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Thu, 27 Oct 2005 02:10:25 +0000 Subject: [PATCH] =?utf8?q?sub=20round=5Famount=20schnedet=20nun=20anh?= =?utf8?q?=C3=A4ngende=20Nullen=20automatisch=20ab.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.20.1