new order for booking fixed

This commit is contained in:
Yan
2017-06-15 14:52:23 +06:30
parent 0778df4e80
commit 18e855f5f9
2 changed files with 7 additions and 3 deletions

View File

@@ -39,12 +39,16 @@ 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?
booking.sale.sale_status == "completed" if 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
else
@order.new_booking = false
@order.booking_id = params[:booking_id]
end
end end
@status, @booking = @order.generate @status, @booking = @order.generate

BIN
dump.rdb

Binary file not shown.