ob es einem gültigen payment type entspricht.
Außerdem korrekte Variablenprüfung, für den Fall, daß kein payment_term
gesetzt ist.
 use SL::DB::Draft;
 use SL::DB::BankAccount;
 use SL::Presenter;
+use SL::DB::Helper::Payment qw(validate_payment_type);
 use List::Util qw(max);
 
 use Rose::Object::MakeMethods::Generic
 
     foreach my $invoice (@invoices) {
       my $payment_type;
-      if (@{ $skonto_hash->{"$bt_id"} }) {
+      if ( defined $skonto_hash->{"$bt_id"} ) {
         $payment_type = shift(@{ $skonto_hash->{"$bt_id"} });
+        SL::DB::Helper::Payment->validate_payment_type($payment_type);
       } else {
         $payment_type = 'without_skonto';
       };