Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -10,19 +10,22 @@ class Origami::CustomersController < BaseOrigamiController
|
||||
def show
|
||||
end
|
||||
|
||||
|
||||
|
||||
def add_customer
|
||||
|
||||
@sale_id = params[:sale_id]
|
||||
filter = params[:filter]
|
||||
|
||||
filter = params[:filter]
|
||||
|
||||
if filter.nil?
|
||||
@crm_customers = Customer.order("name").page params[:page]
|
||||
@crm_customers = Customer.order("customer_id").page(params[:page])
|
||||
#@products = Product.order("name").page(params[:page]).per(5)
|
||||
else
|
||||
@crm_customers = Customer.where("name LIKE ?", "%#{filter}%").order("name").page params[:page]
|
||||
@crm_customers = Customer.search(filter)
|
||||
|
||||
end
|
||||
# @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(2)
|
||||
#@crm_customers = Customer.all
|
||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
||||
@crm_customer = Customer.new
|
||||
|
||||
if flash["errors"]
|
||||
|
||||
Reference in New Issue
Block a user