]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Vendor.pm
RDBO Support.
[mfinanz.git] / SL / DB / Vendor.pm
diff --git a/SL/DB/Vendor.pm b/SL/DB/Vendor.pm
new file mode 100644 (file)
index 0000000..11e23fe
--- /dev/null
@@ -0,0 +1,27 @@
+package SL::DB::Vendor;
+
+use strict;
+
+use SL::DB::MetaSetup::Vendor;
+
+use SL::DB::VC;
+
+__PACKAGE__->meta->add_relationship(
+  shipto => {
+    type         => 'one to many',
+    class        => 'SL::DB::Shipto',
+    column_map   => { id      => 'trans_id' },
+    manager_args => { sort_by => 'lower(shipto.shiptoname)' },
+    query_args   => [ 'shipto.module' => 'CT' ],
+  },
+  business => {
+    type         => 'one to one',
+    class        => 'SL::DB::Business',
+    column_map   => { business_id => 'id' },
+  },
+);
+
+__PACKAGE__->meta->make_manager_class;
+__PACKAGE__->meta->initialize;
+
+1;