From: Sven Schöling Date: Fri, 29 May 2015 13:36:40 +0000 (+0200) Subject: parse_amount: Bei amount undef sofort 0 zurückgeben. X-Git-Tag: release-3.3.0beta~67 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=74f245fba8306d49caf19f9242f912912415068a;p=kivitendo-erp.git parse_amount: Bei amount undef sofort 0 zurückgeben. --- diff --git a/SL/Form.pm b/SL/Form.pm index e597786ec..583a0a1db 100644 --- 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