1 # This file has been auto-generated only because it didn't exist.
2 # Feel free to modify it at will; it will not be overwritten automatically.
4 package SL::DB::TaxZone;
8 use SL::DB::MetaSetup::TaxZone;
9 use SL::DB::Manager::TaxZone;
10 use SL::DB::Helper::ActsAsList;
12 __PACKAGE__->meta->initialize;
14 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
15 #__PACKAGE__->meta->make_manager_class;
21 push @errors, $::locale->text('The description is missing.') if !$self->description;
28 die 'not an accessor' if @_ > 1;
30 my @classes = qw(Customer Vendor Invoice Order DeliveryOrder PurchaseInvoice);
31 foreach my $class ( @classes ) {
32 my $module = 'SL::DB::' . $class;
33 eval "require $module";
34 my $manager = 'SL::DB::Manager::' . $class;
35 return 0 if $manager->get_all_count( query => [ taxzone_id => $self->id ] );