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:
5d24410
)
parse_amount: Bei amount undef sofort 0 zurückgeben.
author
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 29 May 2015 13:36:40 +0000
(15:36 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 29 May 2015 13:36:40 +0000
(15:36 +0200)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
e597786
..
583a0a1
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-957,6
+957,8
@@
sub parse_amount {
sub round_amount {
my ($self, $amount, $places) = @_;
+ return 0 if !defined $amount;
+
# We use Perl's knowledge of string representation for
# rounding. First, convert the floating point number to a string
# with a high number of places. Then split the string on the decimal