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:
1084d82
)
sub round_amount schnedet nun anhängende Nullen automatisch ab.
author
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 02:10:25 +0000
(
02:10
+0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 02:10:25 +0000
(
02:10
+0000)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
712f655
..
eeb470e
100644
(file)
--- 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();