1 package SL::DB::AdditionalBillingAddress;
5 use SL::DB::MetaSetup::AdditionalBillingAddress;
6 use SL::DB::Manager::AdditionalBillingAddress;
8 __PACKAGE__->meta->initialize;
12 my $text = join('; ', grep { $_ } (map({ $self->$_ } qw(name street)),
23 return unless $self->id;
25 require SL::DB::Order;
26 require SL::DB::Invoice;
27 require SL::DB::DeliveryOrder;
29 my %args = (query => [ billing_address_id => $self->id ]);
31 return SL::DB::Manager::Invoice->get_all_count(%args)
32 || SL::DB::Manager::Order->get_all_count(%args)
33 || SL::DB::Manager::DeliveryOrder->get_all_count(%args);
37 $_[0]->customer_id(undef);