From: Moritz Bunkus Date: Fri, 8 Mar 2013 16:47:00 +0000 (+0100) Subject: Warnungen über undefinierte/nicht numerische Werte vermeiden X-Git-Tag: release-3.1.0beta1~538 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e3aa3f5b7ea363bf7ec8e547c583b3b4a0758492;p=kivitendo-erp.git Warnungen über undefinierte/nicht numerische Werte vermeiden --- diff --git a/SL/Form.pm b/SL/Form.pm index d130272dd..141233d94 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -931,6 +931,11 @@ sub parse_amount { my ($self, $myconfig, $amount) = @_; + if (!defined($amount) || ($amount eq '')) { + $main::lxdebug->leave_sub(2); + return 0; + } + if ( ($myconfig->{numberformat} eq '1.000,00') || ($myconfig->{numberformat} eq '1000,00')) { $amount =~ s/\.//g;