diff --git a/app/models/customer.rb b/app/models/customer.rb index dd5f0fb..6ea6ba7 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -146,7 +146,7 @@ class Customer < ActiveRecord::Base if customers.empty? service = Qbo.get_base(:customer).service - results = service.query("Select Id From Customer Where PrimaryPhone LIKE '%#{search}%' OR Mobile LIKE '%#{search}%'") + results = service.query("Select Id From Customer Where PrimaryPhone LIKE '%#{search}%' AND Mobile LIKE '%#{search}%'") results.each do |customer| customers << Customer.find_by_id(customer.id)