This commit is contained in:
Myat Zin Wai Maw
2020-01-15 12:19:27 +06:30
parent 0d2bc27792
commit bad510c6b4
2 changed files with 36 additions and 41 deletions

View File

@@ -96,7 +96,7 @@ class Api::OrdersController < Api::ApiController
end
}
#end extra time
Order.transaction do
# begin
@order = Order.new
@order.source = params[:order_source]
@@ -134,12 +134,7 @@ class Api::OrdersController < Api::ApiController
from = getCloudDomain #get sub domain in cloud mode
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
end
# # for parallel order
# remoteIP = ""
# begin
# @status, @booking = @order.generate
# remoteIP = request.remote_ip
# end while request.remote_ip != remoteIP
end
else
return return_json_status_with_code(406, "Checkout time is over!")
end

View File

@@ -159,7 +159,7 @@ class Sale < ApplicationRecord
})
end
end
puts sale.sale_items.to_json
sale.orders << booking.orders
sale.customer_id = booking.orders[0].customer_id