From 8d05386958d82c45b50062268bb549a08051486f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 18 Aug 2016 14:08:57 +0200 Subject: [PATCH] Payment-Helfer: Rechnen mit undefinierten Werten vermeiden --- SL/DB/Helper/Payment.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.20.1