X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/573562a5411e9a3cb35b586935a6a0ed29d805db..35cf7c7029b4aa69eb9d02c7533d1a15aafb118b:/SL/Controller/BankTransaction.pm?ds=sidebyside diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 47089bdc9..a41957d24 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -24,6 +24,7 @@ use SL::DB::Tax; 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 @@ -373,8 +374,9 @@ sub action_save_invoices { foreach my $invoice (@invoices) { my $payment_type; - if ( @$skonto_hash{"$bt_id"} ) { - $payment_type = shift( @$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'; };