warnings: nicht initialisierte Variable in Helper/Payment
authorSven Schöling <s.schoeling@linet-services.de>
Tue, 22 Mar 2016 12:00:58 +0000 (13:00 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 22 Mar 2016 12:00:58 +0000 (13:00 +0100)
SL/DB/Helper/Payment.pm

index 93dc1ec..719d935 100644 (file)
@@ -368,7 +368,7 @@ sub amount_less_skonto {
 
   my $is_sales = ref($self) eq 'SL::DB::Invoice';
 
-  my $percent_skonto = $self->percent_skonto;
+  my $percent_skonto = $self->percent_skonto || 0;
 
   return _round($self->amount - ( $self->amount * $percent_skonto) );