projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f43900d
)
Ă„nderungen bez. sub round_amound von heute Morgen wieder herausgenommen, weil nonfunk...
author
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 17:06:05 +0000
(17:06 +0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Thu, 27 Oct 2005 17:06:05 +0000
(17:06 +0000)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
d4c456a
..
80c1ef7
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-610,16
+610,11
@@
sub round_amount {
# Descr. http://de.wikipedia.org/wiki/Rundung
# Inspired by
# http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
# Descr. http://de.wikipedia.org/wiki/Rundung
# Inspired by
# http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
- #
Solves
Bug: 189
+ #
Version 1.0 try to solve
Bug: 189
# Udo Spallek
$amount = $amount * (10 ** ($places));
$round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
# Udo Spallek
$amount = $amount * (10 ** ($places));
$round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
- while ($places > 0 && $round_amount=~ /\./){
- $round_amount =~ s/[0]$//g;
- $places--;
- } ;
- #$round_amount =~ s/\.$//g;
$main::lxdebug->leave_sub();
return $round_amount;
$main::lxdebug->leave_sub();
return $round_amount;