]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/PurchaseInvoice.pm
Konflikt zwischen zwei Upgrade-Scripten beheben
[mfinanz.git] / SL / DB / PurchaseInvoice.pm
index da34a27b8a496d8abd30f891bc913532d0c4af8d..f74ee19e146c0a006b79303e61ca973e6e5e3e29 100644 (file)
@@ -10,12 +10,20 @@ use SL::DB::Helper::LinkedRecords;
 # The calculator hasn't been adjusted for purchase invoices yet.
 # use SL::DB::Helper::PriceTaxCalculator;
 
-__PACKAGE__->meta->add_relationship(invoiceitems => { type         => 'one to many',
-                                                      class        => 'SL::DB::InvoiceItem',
-                                                      column_map   => { id => 'trans_id' },
-                                                      manager_args => { with_objects => [ 'part' ] }
-                                                    },
-                                   );
+__PACKAGE__->meta->add_relationship(
+  invoiceitems   => {
+    type         => 'one to many',
+    class        => 'SL::DB::InvoiceItem',
+    column_map   => { id => 'trans_id' },
+    manager_args => { with_objects => [ 'part' ] }
+  },
+  sepa_export_items => {
+    type            => 'one to many',
+    class           => 'SL::DB::SepaExportItem',
+    column_map      => { id => 'ap_id' },
+    manager_args    => { with_objects => [ 'sepa_export' ] }
+  },
+);
 
 __PACKAGE__->meta->initialize;
 
@@ -27,4 +35,8 @@ sub is_sales {
   return 0;
 }
 
+sub date {
+  goto &transdate;
+}
+
 1;