X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPresenter%2FRecord.pm;h=d8d11fc98f8c968016bf3c54185b6c801f8454d8;hb=43d9aa7bb5be1705c8431f2298b4217ac2609e33;hp=b395e822a8c52ccf0e8ba8f492e9a2bac150eeb1;hpb=a87694dc525b4eabff11029f1e5401621e2bd3bc;p=kivitendo-erp.git diff --git a/SL/Presenter/Record.pm b/SL/Presenter/Record.pm index b395e822a..d8d11fc98 100644 --- a/SL/Presenter/Record.pm +++ b/SL/Presenter/Record.pm @@ -55,11 +55,15 @@ sub grouped_record_list { $output .= _purchase_invoice_list( $self, $groups{purchase_invoices}, %params) if $groups{purchase_invoices}; $output .= _ap_transaction_list( $self, $groups{ap_transactions}, %params) if $groups{ap_transactions}; + $output .= _gl_transaction_list( $self, $groups{gl_transactions}, %params) if $groups{gl_transactions}; + $output .= _bank_transactions( $self, $groups{bank_transactions}, %params) if $groups{bank_transactions}; $output .= _sepa_collection_list( $self, $groups{sepa_collections}, %params) if $groups{sepa_collections}; $output .= _sepa_transfer_list( $self, $groups{sepa_transfers}, %params) if $groups{sepa_transfers}; + $output .= _letter_list( $self, $groups{letters}, %params) if $groups{letters}; + $output = $self->render('presenter/record/grouped_record_list', %params, output => $output); return $output; @@ -180,6 +184,7 @@ sub _group_records { sepa_transfers => sub { (ref($_[0]) eq 'SL::DB::SepaExportItem') && $_[0]->ap_id }, gl_transactions => sub { (ref($_[0]) eq 'SL::DB::GLTransaction') }, bank_transactions => sub { (ref($_[0]) eq 'SL::DB::BankTransaction') && $_[0]->id }, + letters => sub { (ref($_[0]) eq 'SL::DB::Letter') && $_[0]->id }, ); my %groups; @@ -432,6 +437,22 @@ sub _ap_transaction_list { ); } +sub _gl_transaction_list { + my ($self, $list, %params) = @_; + + return $self->record_list( + $list, + title => $::locale->text('GL Transactions'), + type => 'gl_transaction', + columns => [ + [ $::locale->text('Date'), 'transdate' ], + [ $::locale->text('Reference'), 'reference' ], + [ $::locale->text('Description'), sub { $self->gl_transaction($_[0 ], display => 'table-cell') } ], + ], + %params, + ); +} + sub _bank_transactions { my ($self, $list, %params) = @_; @@ -490,6 +511,24 @@ sub _sepa_collection_list { _sepa_export_list($self, $list, %params, type => 'sepa_collection'); } +sub _letter_list { + my ($self, $list, %params) = @_; + + return $self->record_list( + $list, + title => $::locale->text('Letters'), + type => 'letter', + columns => [ + [ $::locale->text('Date'), 'date' ], + [ $::locale->text('Letternumber'), sub { $self->letter($_[0], display => 'table-cell') } ], + [ $::locale->text('Customer'), 'customer' ], + [ $::locale->text('Reference'), 'reference' ], + [ $::locale->text('Subject'), 'subject' ], + ], + %params, + ); +} + 1; __END__ @@ -572,6 +611,8 @@ The order in which the records are grouped is: =item * AP transactions +=item * GL transactions + =item * SEPA collections =item * SEPA transfers