crong job and close cashier

This commit is contained in:
Aung Myo
2017-07-02 09:37:19 +06:30
parent c26b80066b
commit 78adf564e1
6 changed files with 64 additions and 1 deletions

View File

@@ -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