From: Moritz Bunkus Date: Tue, 3 May 2011 15:59:51 +0000 (+0200) Subject: Manager-Klasse für Customer X-Git-Tag: release-2.7.0beta1~396^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=476b6d40310951004704374a3f248b35ef2ada3f;p=kivitendo-erp.git Manager-Klasse für Customer --- diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index c2c436dfd..186ad9750 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -35,7 +35,6 @@ __PACKAGE__->meta->add_relationship( }, ); -__PACKAGE__->meta->make_manager_class; __PACKAGE__->meta->initialize; __PACKAGE__->before_save('_before_save_set_customernumber'); diff --git a/SL/DB/Manager/Customer.pm b/SL/DB/Manager/Customer.pm new file mode 100644 index 000000000..0d62fe8f2 --- /dev/null +++ b/SL/DB/Manager/Customer.pm @@ -0,0 +1,21 @@ +package SL::DB::Manager::Customer; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::Customer' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'name', 1 ], + columns => { SIMPLE => 'ALL', + map { ( $_ => "lower(customer.$_)" ) } qw(customernumber vendornumber name contact phone fax email street taxnumber business invnumber ordnumber quonumber) + }); +} + +1;