X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8b7b7b3f6252786b38bb6c9357fc00a08750b8db..5ca497d53b8c09d4598fd73a5e73a032cf6731df:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index b3adee734..516352e8a 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -25,17 +25,27 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::InvoiceItem', column_map => { id => 'trans_id' }, manager_args => { - with_objects => [ 'parts' ] + with_objects => [ 'part' ] } }, + storno_invoices => { + type => 'one to many', + class => 'SL::DB::Invoice', + column_map => { id => 'storno_id' }, + }, ); __PACKAGE__->meta->initialize; # methods -sub items { goto &invoiceitems; } -sub payment_term { goto &payment; } +sub items { goto &invoiceitems; } + +sub is_sales { + # For compatibility with Order, DeliveryOrder + croak 'not an accessor' if @_ > 1; + return 1; +} # it is assumed, that ordnumbers are unique here. sub first_order_by_ordnumber {