Merge branch 'addorder' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-08-24 15:21:46 +06:30
4 changed files with 19 additions and 18 deletions

View File

@@ -29,19 +29,20 @@ class Origami::CustomersController < BaseOrigamiController
@crm_customers.date_of_birth = response["customer_data"]["DOB"]
@crm_customers.nrc_no = response["customer_data"]["NRC"]
@crm_customers.address = response["customer_data"]["address"]
@crm_customers.card_no = 121212
@crm_customers.card_no = response["customer_data"]["customer_card_no"]
@crm_customers.paypar_account_no = filter
@crm_customers.membership_id = response["customer_data"]["id"]
@crm_customers.membership_type = response["customer_data"]["member_group_id"]
@crm_customers.customer_type = "Dinein"
@crm_customers.tax_profiles = ["1", "2"]
@crm_customers.save
@crm_customers = Customer.search(filter)
else
@crm_customers = {:status=> response["status"],:message=>response["message"] }
@crm_customers = [{"customer_id": response["status"],"message": response["message"] }]
end
end
end
puts @crm_customers
render :json => @crm_customers.to_json
end