From: Moritz Bunkus Date: Thu, 3 Mar 2011 10:06:53 +0000 (+0100) Subject: Sortierfunktion für Pricegroup-Model X-Git-Tag: release-2.6.3~58^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=feef731c40b0b06fd7b566f4dcce322bc68b7946;p=kivitendo-erp.git Sortierfunktion für Pricegroup-Model --- diff --git a/SL/DB/Manager/Pricegroup.pm b/SL/DB/Manager/Pricegroup.pm new file mode 100644 index 000000000..6da4f216b --- /dev/null +++ b/SL/DB/Manager/Pricegroup.pm @@ -0,0 +1,21 @@ +package SL::DB::Manager::Pricegroup; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::Pricegroup' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'pricegroup', 1 ], + columns => { SIMPLE => 'ALL', + map { ( $_ => "lower(pricegroup.${_})" ) } qw(pricegroup), + }); +} + +1; diff --git a/SL/DB/Pricegroup.pm b/SL/DB/Pricegroup.pm index 8c9c3727e..329dc41b2 100644 --- a/SL/DB/Pricegroup.pm +++ b/SL/DB/Pricegroup.pm @@ -1,13 +1,8 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::Pricegroup; use strict; use SL::DB::MetaSetup::Pricegroup; - -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +use SL::DB::Manager::Pricegroup; 1;