crong job and close cashier
This commit is contained in:
@@ -123,7 +123,8 @@ class Crm::CustomersController < BaseCrmController
|
||||
end
|
||||
# format.json { render :index, status: :created, location: @crm_customers }
|
||||
else
|
||||
# @crm_customers.destroy
|
||||
customer = Customer.find(@crm_customers.customer_id)
|
||||
status = customer.update_attributes(membership_type:member_group_id )
|
||||
if params[:sale_id]
|
||||
format.html { redirect_to '/origami/'+params[:sale_id]+'/customers', notice: 'Customer was successfully created. '}
|
||||
else
|
||||
@@ -207,7 +208,12 @@ end
|
||||
status = customer.update_attributes(membership_id: response["customer_datas"]["id"],membership_type:member_group_id )
|
||||
|
||||
format.html { redirect_to crm_customers_path, notice: 'Customer was successfully updated'}
|
||||
|
||||
else
|
||||
|
||||
customer = Customer.find(@crm_customer.customer_id)
|
||||
status = customer.update_attributes(membership_type:member_group_id )
|
||||
|
||||
format.html { redirect_to crm_customers_path, notice: response["error"] }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user