From 0bef110445e52973180b35d3d0d4680f4184d238 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 19 Feb 2019 14:28:54 +0100 Subject: [PATCH] SL::Dev::Payment - check if bank account exists --- SL/Dev/Payment.pm | 1 + 1 file changed, 1 insertion(+) 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, -- 2.20.1