From: Moritz Bunkus Date: Thu, 18 Aug 2016 12:08:57 +0000 (+0200) Subject: Payment-Helfer: Rechnen mit undefinierten Werten vermeiden X-Git-Tag: release-3.5.4~2125 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8d05386958d82c45b50062268bb549a08051486f;p=kivitendo-erp.git Payment-Helfer: Rechnen mit undefinierten Werten vermeiden --- diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index b7bf38a12..64d6a639c 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -387,7 +387,7 @@ sub open_amount { # if the difference is 0.01 Cent this may end up as 0.009999999999998 # numerically, so round this value when checking for cent threshold >= 0.01 - return $self->amount - $self->paid; + return ($self->amount // 0) - ($self->paid // 0); }; sub open_percent {