projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
999fedb
)
Version2
author
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 02:16:29 +0000
(
02:16
+0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 02:16:29 +0000
(
02:16
+0000)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
eeb470e
..
251b048
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-615,11
+615,11
@@
sub round_amount {
$amount = $amount * (10 ** ($places));
$round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
-
do
{
-
$round_amount =~ s/(0|\.)
$//g;
-
$places--;
-
} while ($places > 0)
;
-
+
while ($places > 0 && $round_amount=~ /\./)
{
+
$round_amount =~ s/[0]
$//g;
+ $places--;
+
}
;
+ $round_amount =~ s/\.$//g;
$main::lxdebug->leave_sub();
return $round_amount;