1 package SL::DB::Manager::TaxZone;
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
8 use SL::DB::Helper::Paginated;
9 use SL::DB::Helper::Sorted;
11 sub object_class { 'SL::DB::TaxZone' }
13 __PACKAGE__->make_manager_methods;
16 return ( default => [ 'sortkey', 1 ],
17 columns => { SIMPLE => 'ALL' } );
21 return $_[0]->get_first(where => [ obsolete => 0 ], sort_by => 'sortkey');
33 SL::DB::Manager::TaxZone - RDBO manager for the C<tax_zones> table
41 Returns an RDBO instance corresponding to the default taxzone. The default
42 taxzone is defined as the taxzone with the highest sort order (usually 1) that
43 is not set to obsolete.
47 my $default_taxzone_id = SL::DB::Manager::TaxZone->get_default->id;