diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index 0af08e5d..21c2d373 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -6,8 +6,13 @@ class Crm::CustomersController < BaseCrmController # GET /crm/customers.json def index filter = params[:filter] + filter_card_no = params[:filter_card_no] type = params[:type] - if filter.nil? + if filter_card_no=="" + @crm_customers = Customer.all + elsif !filter_card_no.nil? + @crm_customers=Customer.where("card_no=?",filter_card_no) + elsif filter.nil? || filter_card_no=="" @crm_customers = Customer.all else @crm_customers = Customer.search(filter) diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index b949291b..76d1dce8 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -15,7 +15,7 @@
-
+
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
@@ -32,6 +32,20 @@
<% end %>
+
+ <%= form_tag crm_customers_path, :method => :get do %> +
+
+ +
+
+ + + +
+
+ <%end %> +
diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index fb212f13..cab8fe5d 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -20,11 +20,11 @@ class ActionController::Base end else # check for license file - if check_license - current_license(ENV["SX_PROVISION_URL"]) - else - redirect_to activate_path - end + # if check_license + # current_license(ENV["SX_PROVISION_URL"]) + # else + # redirect_to activate_path + # end end end