heck rounding adjustment error

This commit is contained in:
phyusin
2018-01-28 16:12:59 +06:30
parent d4e2d5be25
commit aa129ad469
9 changed files with 66 additions and 53 deletions

View File

@@ -184,12 +184,16 @@ class Api::OrdersController < Api::ApiController
#checked checkin and checkout time
def checkin_checkout_time(booking_id)
status = true
today = Time.now.utc
booking = Booking.find(params[:booking_id])
if !booking.nil?
checkout_time = booking.checkout_at.utc
if checkout_time <= today
status = false
if !params[:booking_id].nil?
today = Time.now.utc
booking = Booking.find(params[:booking_id])
if !booking.nil?
if !booking.checkout_at.nil?
checkout_time = booking.checkout_at.utc
if checkout_time <= today
status = false
end
end
end
end
return status