]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Vendor.pm
Verknüpfung Vendor -> Contact
[mfinanz.git] / SL / DB / Vendor.pm
index d1d972a1586e881f250f5c8e6223cbbdfc2fc952..42e6ca690ebfb550fafae79eb24062fe2f440d3c 100644 (file)
@@ -15,6 +15,12 @@ __PACKAGE__->meta->add_relationship(
     manager_args => { sort_by => 'lower(shipto.shiptoname)' },
     query_args   => [ 'shipto.module' => 'CT' ],
   },
+  contacts => {
+    type         => 'one to many',
+    class        => 'SL::DB::Contact',
+    column_map   => { id      => 'cp_cv_id' },
+    manager_args => { sort_by => 'lower(contacts.cp_name)' },
+  },
   business => {
     type         => 'one to one',
     class        => 'SL::DB::Business',