X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FDeliveryOrder.pm;h=b65bf3eb6960e9343ba78bf8705e9360cb12a068;hb=21c964b9ec4972346d9c6b7fef370268b4caf789;hp=0dacf9a2af855ce3ce444ac07f29f3282d783d68;hpb=82515b2d93dc5632f24d6e0b6f8f05f3fd19fbb0;p=kivitendo-erp.git diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 0dacf9a2a..b65bf3eb6 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -4,25 +4,33 @@ use strict; use SL::DB::MetaSetup::DeliveryOrder; use SL::DB::Manager::DeliveryOrder; +use SL::DB::Helper::LinkedRecords; +use SL::DB::Helper::TransNumberGenerator; use SL::DB::Order; use List::Util qw(first); -for my $field (qw(transdate reqdate)) { - __PACKAGE__->attr_date($field); -} - __PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many', class => 'SL::DB::DeliveryOrderItem', column_map => { id => 'trans_id' }, manager_args => { with_objects => [ 'part' ] } }, + shipto => { type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { shipto_id => 'shipto_id' }, + }, + department => { type => 'one to one', + class => 'SL::DB::Department', + column_map => { department_id => 'id' }, + }, ); __PACKAGE__->meta->initialize; # methods +sub items { goto &orderitems; } + sub sales_order { my $self = shift; my %params = @_;