]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Invoice.pm
warnings
[mfinanz.git] / SL / DB / Invoice.pm
index b3adee7349244f260e85f5d340289ff77fe65c5a..516352e8aea9f9c397b979e9aa6beebda705c909 100644 (file)
@@ -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 {