]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/GLTransaction.pm
kivitendo 3.9.2-0.2
[mfinanz.git] / SL / DB / GLTransaction.pm
index 1dbf2c813348d8d860497671b0309d1aab5bb4c9..06263378be6568bb32bd1fdf0c4a7d10960a6c8b 100644 (file)
@@ -4,15 +4,13 @@ use strict;
 
 use SL::DB::Helper::LinkedRecords;
 use SL::DB::MetaSetup::GLTransaction;
+use SL::DB::Manager::GLTransaction;
 use SL::Locale::String qw(t8);
 use List::Util qw(sum);
 use SL::DATEV;
 use Carp;
 use Data::Dumper;
 
-# 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',
@@ -27,6 +25,10 @@ __PACKAGE__->meta->add_relationship(
 
 __PACKAGE__->meta->initialize;
 
+sub record_type {return 'gl_transaction';}
+sub record_number {goto &id;}
+sub displayable_name {goto &oneline_summary;}
+
 sub abbreviation {
   my $self = shift;
 
@@ -152,7 +154,7 @@ sub add_chart_booking {
     $taxamount *= -1;
   };
 
-  next unless $netamount; # skip entries with netamount 0
+  return unless $netamount; # skip entries with netamount 0
 
   # initialise transactions if it doesn't exist yet
   $self->transactions([]) unless $self->transactions;