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:
cd1ec53
)
Form->format_amount: Warnung über negativen repeat count vermeiden
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 2 Nov 2015 14:02:39 +0000
(15:02 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 2 Nov 2015 14:02:39 +0000
(15:02 +0100)
Warnung erscheint, wenn bei Konstrukten wie »'str' x $anzahl« die
$anzahl negativ ist.
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
c59669c
..
c290972
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-839,7
+839,7
@@
sub format_amount {
if ($places || $p[1]) {
$amount .= $d[0]
. ( $p[1] || '' )
- . (0 x
(abs($places || 0) - length ($p[1]||'')));
# pad the fraction
+ . (0 x
max(abs($places || 0) - length ($p[1]||''), 0));
# pad the fraction
}
$amount = do {