use strict;
use SL::DB::MetaSetup::GLTransaction;
-
+use SL::Locale::String qw(t8);
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
__PACKAGE__->meta->make_manager_class;
return $abbreviation;
}
+sub displayable_type {
+ return t8('GL Transaction');
+}
+
sub oneline_summary {
my ($self) = @_;
return sprintf("%s: %s %s (%s)", $self->abbreviation, $self->description, $self->reference, $_->transdate->to_kivitendo);
$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};
);
}
+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) = @_;
=item * AP transactions
+=item * GL transactions
+
=item * SEPA collections
=item * SEPA transfers