X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8b17f06f580736d3ebcb120581ad20efffe9a678..d40a8e2:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 7626793c2..08c580973 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -45,6 +45,15 @@ __PACKAGE__->meta->add_relationship( column_map => { id => 'trans_id' }, query_args => [ module => 'AR' ], }, + 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; @@ -351,15 +360,6 @@ sub customervendor { goto &customer; } -sub transactions { - my ($self) = @_; - - return unless $self->id; - - require SL::DB::AccTransaction; - SL::DB::Manager::AccTransaction->get_all(query => [ trans_id => $self->id ]); -} - 1; __END__