From: G. Richardson Date: Tue, 19 Feb 2019 13:28:54 +0000 (+0100) Subject: SL::Dev::Payment - check if bank account exists X-Git-Tag: release-3.5.6.1~537 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0bef110445e52973180b35d3d0d4680f4184d238;p=kivitendo-erp.git SL::Dev::Payment - check if bank account exists --- diff --git a/SL/Dev/Payment.pm b/SL/Dev/Payment.pm index 0fdb3a4aa..a093ed444 100644 --- a/SL/Dev/Payment.pm +++ b/SL/Dev/Payment.pm @@ -82,6 +82,7 @@ sub create_bank_transaction { $bank_chart = SL::DB::Manager::Chart->find_by(description => 'Bank') or die "Can't find bank chart"; } my $bank_account = SL::DB::Manager::BankAccount->find_by( chart_id => $bank_chart->id ); + die "bank account missing" unless $bank_account; my $bt = SL::DB::BankTransaction->new( local_bank_account_id => $bank_account->id,