From 398f97f244b0e80edcd898bcdbffe05eaa1760aa Mon Sep 17 00:00:00 2001 From: phyusin Date: Thu, 27 Dec 2018 16:08:34 +0630 Subject: [PATCH] check duplicate paypar account no issue --- app/controllers/crm/customers_controller.rb | 3 +++ .../origami/customers_controller.rb | 3 ++- app/views/crm/customers/_new_form.html.erb | 25 ++++++++++++++++--- app/views/origami/customers/index.html.erb | 23 ++++++++++++++--- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index cc00984d..0af08e5d 100644 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -45,6 +45,9 @@ class Crm::CustomersController < BaseCrmController @filter = filter + #get paypar accountno + @paypar_accountno = Customer.where("paypar_account_no IS NOT NULL AND paypar_account_no != ''").pluck("paypar_account_no") + #for create customer on/off @create_flag = true lookup_customer = Lookup.collection_of('customer_settings') diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index 6f24cf2b..d5e6b524 100644 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -93,7 +93,8 @@ class Origami::CustomersController < BaseOrigamiController # @crm_customer.valid? # end @membership_types = Lookup.collection_of("member_group_type") - + #get paypar accountno + @paypar_accountno = Customer.where("paypar_account_no IS NOT NULL AND paypar_account_no != ''").pluck("paypar_account_no") #for create customer on/off @create_flag = true lookup_customer = Lookup.collection_of('customer_settings') diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index ef5c76ba..5603256c 100644 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -244,8 +244,11 @@