]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/MetaSetup/DeliveryOrderItem.pm
restart apache2 in postinst
[mfinanz.git] / SL / DB / MetaSetup / DeliveryOrderItem.pm
index aabf2b5f005ff63c5ebc8f620fca779ed2c97e88..6c8f5a2ed61e0ff5bf7fa00875e60704b45258ac 100644 (file)
@@ -4,24 +4,25 @@ package SL::DB::DeliveryOrderItem;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
 
 __PACKAGE__->meta->table('delivery_order_items');
 
 __PACKAGE__->meta->columns(
   active_discount_source => { type => 'text', default => '', not_null => 1 },
   active_price_source    => { type => 'text', default => '', not_null => 1 },
-  base_qty               => { type => 'float', scale => 4 },
+  base_qty               => { type => 'float', precision => 4, scale => 4 },
   cusordnumber           => { type => 'text' },
   delivery_order_id      => { type => 'integer', not_null => 1 },
   description            => { type => 'text' },
-  discount               => { type => 'float', scale => 4 },
+  discount               => { type => 'float', precision => 4, scale => 4 },
   id                     => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
   itime                  => { type => 'timestamp', default => 'now()' },
   lastcost               => { type => 'numeric', precision => 15, scale => 5 },
   longdescription        => { type => 'text' },
   marge_price_factor     => { type => 'numeric', default => 1, precision => 15, scale => 5 },
   mtime                  => { type => 'timestamp' },
+  orderer_id             => { type => 'integer' },
   ordnumber              => { type => 'text' },
   parts_id               => { type => 'integer', not_null => 1 },
   position               => { type => 'integer', not_null => 1 },
@@ -47,6 +48,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { delivery_order_id => 'id' },
   },
 
+  orderer => {
+    class       => 'SL::DB::Employee',
+    key_columns => { orderer_id => 'id' },
+  },
+
   part => {
     class       => 'SL::DB::Part',
     key_columns => { parts_id => 'id' },