update api

This commit is contained in:
Nweni
2017-06-16 09:27:39 +06:30
parent 14e3ee93b5
commit 998ec1bd01
2 changed files with 6 additions and 6 deletions

View File

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