Payment Helper - besser Fehlermeldung in pay_invoice
authorG. Richardson <grichardson@kivitec.de>
Wed, 11 Apr 2018 09:03:37 +0000 (11:03 +0200)
committerG. Richardson <grichardson@kivitec.de>
Tue, 8 May 2018 11:28:01 +0000 (13:28 +0200)
SL/DB/Helper/Payment.pm

index c35b12c..97aff8f 100644 (file)
@@ -107,7 +107,7 @@ sub pay_invoice {
 
   # account where money is paid to/from: bank account or cash
   my $account_bank = SL::DB::Manager::Chart->find_by(id => $params{chart_id});
-  croak "can't find bank account" unless ref $account_bank;
+  croak "can't find bank account with id " . $params{chart_id} unless ref $account_bank;
 
   my $reference_account = $self->reference_account;
   croak "can't find reference account (link = AR/AP) for invoice" unless ref $reference_account;