This commit is contained in:
Aung Myo
2017-08-14 15:01:44 +06:30
parent 069ad16733
commit a691eb8d64
4 changed files with 15 additions and 11 deletions

View File

@@ -60,6 +60,7 @@ class Origami::CustomersController < BaseOrigamiController
id = params[:sale_id][0,3]
customer_id = params[:customer_id]
customer = Customer.find(customer_id)
# Check and find with card no
# if(!customer_id.include? "CUS")
@@ -74,7 +75,7 @@ class Origami::CustomersController < BaseOrigamiController
status = sale.update_attributes(customer_id: customer_id)
sale.sale_orders.each do |sale_order|
order = Order.find(sale_order.order_id)
status = order.update_attributes(customer_id: customer_id)
status = order.update_attributes(customer_id: customer_id,order_type:customer.customer_type)
end
else
@booking = BookingOrder.find_by_order_id(params[:sale_id])
@@ -82,7 +83,7 @@ class Origami::CustomersController < BaseOrigamiController
@orders.each do |bo|
order = Order.find(bo.order_id)
status = order.update_attributes(customer_id: customer_id)
status = order.update_attributes(customer_id: customer_id,order_type:customer.customer_type)
end
end