X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ace13a46b4c48674267d176c3c641930a444d48b..c5dccb51a821e57f3888370bea51dab9f82c0639:/SL/Controller/BankTransaction.pm?ds=sidebyside diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index 3d98e9fec..1a0f50589 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -691,14 +691,13 @@ sub save_single_bank_transaction { } } # Record a record link from the bank transaction to the invoice - my @props = ( + my %props = ( from_table => 'bank_transactions', from_id => $bt_id, to_table => $invoice->is_sales ? 'ar' : 'ap', to_id => $invoice->id, ); - - SL::DB::RecordLink->new(@props)->save; + SL::DB::RecordLink->new(%props)->save; # "close" a sepa_export_item if it exists # code duplicated in action_save_proposals! @@ -797,7 +796,8 @@ sub prepare_report { align => 'right' }, invoice_amount => { sub => sub { $_[0]->invoice_amount_as_number }, align => 'right' }, - invoices => { sub => sub { $_[0]->linked_invoices } }, + invoices => { sub => sub { my @invnumbers; for my $obj (@{ $_[0]->linked_invoices }) { + next unless $obj; push @invnumbers, $obj->invnumber } return \@invnumbers } }, currency => { sub => sub { $_[0]->currency->name } }, purpose => { }, local_account_number => { sub => sub { $_[0]->local_bank_account->account_number } },