SL::Controller::Customer entfernt
authorThomas Heck <theck@linet-services.de>
Mon, 24 Jun 2013 08:40:44 +0000 (10:40 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Thu, 18 Jul 2013 07:09:01 +0000 (09:09 +0200)
SL/Controller/Customer.pm [deleted file]

diff --git a/SL/Controller/Customer.pm b/SL/Controller/Customer.pm
deleted file mode 100644 (file)
index 823af2e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package SL::Controller::Customer;
-
-use strict;
-use parent qw(SL::Controller::Base);
-
-use SL::DB::Customer;
-
-# safety
-__PACKAGE__->run_before(sub { $::auth->assert('customer_vendor_edit') });
-
-sub action_ajax_autocomplete {
-  my ($self, %params) = @_;
-
-  my $limit  = $::form->{limit}  || 20;
-  my $type   = $::form->{type} || {};
-  my $query  = { ilike => "%$::form->{term}%" };
-  my @filter;
-  push @filter, ($::form->{column})
-    ? ($::form->{column} => $query)
-    : (or => [ customernumber => $query, name => $query ]);
-
-  $self->{customers} = SL::DB::Manager::Customer->get_all(query => [ @filter ], limit => $limit);
-  $self->{value} = $::form->{column} || 'name';
-
-  $self->render('ct/ajax_autocomplete2', { layout => 0, type => 'json' });
-}