X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/91bd08d8315e733c3390088f3187b4c5b1fb9a52..5ca497d53b8c09d4598fd73a5e73a032cf6731df:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index ff821ef75..516352e8a 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -28,14 +28,24 @@ __PACKAGE__->meta->add_relationship( 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 {