52c8b6e2e28aff250d9ed84000134546d66b862a
[kivitendo-erp.git] / SL / DB / GLTransaction.pm
1 package SL::DB::GLTransaction;
2
3 use strict;
4
5 use SL::DB::MetaSetup::GLTransaction;
6
7
8 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
9 __PACKAGE__->meta->make_manager_class;
10
11 __PACKAGE__->meta->add_relationship(
12   transactions   => {
13     type         => 'one to many',
14     class        => 'SL::DB::AccTransaction',
15     column_map   => { id => 'trans_id' },
16     manager_args => {
17       with_objects => [ 'chart' ],
18       sort_by      => 'acc_trans_id ASC',
19     },
20   },
21 );
22
23 __PACKAGE__->meta->initialize;
24
25 sub abbreviation {
26   my $self = shift;
27
28   my $abbreviation = $::locale->text('GL Transaction (abbreviation)');
29   $abbreviation   .= "(" . $::locale->text('Storno (one letter abbreviation)') . ")" if $self->storno;
30   return $abbreviation;
31
32 }
33
34 1;