Manager für PriceFactor mit sort_spec
authorG. Richardson <information@kivitendo-premium.de>
Sun, 7 Aug 2016 20:42:20 +0000 (22:42 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Tue, 22 Nov 2016 13:42:49 +0000 (14:42 +0100)
SL/DB/Manager/PriceFactor.pm [new file with mode: 0644]
SL/DB/PriceFactor.pm

diff --git a/SL/DB/Manager/PriceFactor.pm b/SL/DB/Manager/PriceFactor.pm
new file mode 100644 (file)
index 0000000..84030c8
--- /dev/null
@@ -0,0 +1,20 @@
+package SL::DB::Manager::PriceFactor;
+
+use strict;
+
+use SL::DB::Helper::Manager;
+use base qw(SL::DB::Helper::Manager);
+
+use SL::DB::Helper::Sorted;
+
+sub object_class { 'SL::DB::PriceFactor' }
+
+__PACKAGE__->make_manager_methods;
+
+sub _sort_spec {
+  return ( default => [ 'sortkey', 1 ],
+           columns => { SIMPLE => 'ALL' });
+}
+
+1;
+
index 591a97d..af8b4ef 100644 (file)
@@ -3,12 +3,11 @@ package SL::DB::PriceFactor;
 use strict;
 
 use SL::DB::MetaSetup::PriceFactor;
+use SL::DB::Manager::PriceFactor;
 use SL::DB::Helper::ActsAsList;
 
 __PACKAGE__->meta->initialize;
 
-__PACKAGE__->meta->make_manager_class;
-
 1;
 
 __END__