checkin get update

This commit is contained in:
Yan
2017-12-07 13:38:41 +06:30
parent e4b4a3d986
commit 970b6f857e

View File

@@ -9,7 +9,14 @@ class Api::CheckInProcessController < Api::ApiController
check_out_time = booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M")
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time }
else
render :json => { :status => false, :error_message => "No current booking!" }
sale_booking = dining_facility.get_current_checkout_booking
if !sale_booking.nil?
check_in_time = sale_booking.checkin_at.utc.getlocal.strftime("%Y-%m-%d %H:%M")
check_out_time = sale_booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M")
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time }
else
render :json => { :status => false, :error_message => "No current booking!" }
end
end
end
end