order fix for booking

This commit is contained in:
Yan
2017-06-15 14:44:27 +06:30
parent 344d27f034
commit 0778df4e80
3 changed files with 6 additions and 7 deletions

View File

@@ -39,14 +39,13 @@ class Api::OrdersController < Api::ApiController
# check booking id is already completed. # check booking id is already completed.
booking = Booking.find(params[:booking_id]) booking = Booking.find(params[:booking_id])
if !booking.sale_id.nil? if !booking.sale_id.nil?
if booking.sale.sale_status == "completed" booking.sale.sale_status == "completed"
@order.new_booking = true @order.new_booking = true
else else
@order.new_booking = false @order.new_booking = false
@order.booking_id = params[:booking_id] @order.booking_id = params[:booking_id]
end end
end end
end
@status, @booking = @order.generate @status, @booking = @order.generate
end end

BIN
dump.rdb

Binary file not shown.