1 package SL::DB::Shipto;
5 use SL::DB::MetaSetup::Shipto;
7 our @SHIPTO_VARIABLES = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
8 shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2);
10 __PACKAGE__->meta->make_manager_class;
14 my $text = join('; ', grep { $_ } (map({ $self->$_ } qw(shiptoname shiptostreet)),
17 qw(shiptozipcode shiptocity))));
25 return unless $self->shipto_id;
27 require SL::DB::Order;
28 require SL::DB::Invoice;
29 require SL::DB::DeliveryOrder;
31 return SL::DB::Manager::Order->get_all_count(query => [ shipto_id => $self->shipto_id ])
32 || SL::DB::Manager::Invoice->get_all_count(query => [ shipto_id => $self->shipto_id ])
33 || SL::DB::Manager::DeliveryOrder->get_all_count(query => [ shipto_id => $self->shipto_id ]);
37 $_[0]->trans_id(undef);