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