update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user