SL::DB::RequirementSpec: time_estimation auch als _as_man_days, _as_man_days_unit
[kivitendo-erp.git] / SL / DB / GLTransaction.pm
index b1550e9..52c8b6e 100644 (file)
@@ -4,7 +4,31 @@ use strict;
 
 use SL::DB::MetaSetup::GLTransaction;
 
+
 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 __PACKAGE__->meta->make_manager_class;
 
+__PACKAGE__->meta->add_relationship(
+  transactions   => {
+    type         => 'one to many',
+    class        => 'SL::DB::AccTransaction',
+    column_map   => { id => 'trans_id' },
+    manager_args => {
+      with_objects => [ 'chart' ],
+      sort_by      => 'acc_trans_id ASC',
+    },
+  },
+);
+
+__PACKAGE__->meta->initialize;
+
+sub abbreviation {
+  my $self = shift;
+
+  my $abbreviation = $::locale->text('GL Transaction (abbreviation)');
+  $abbreviation   .= "(" . $::locale->text('Storno (one letter abbreviation)') . ")" if $self->storno;
+  return $abbreviation;
+
+}
+
 1;