change checkout fun: in UI

This commit is contained in:
phyusin
2017-12-08 10:40:57 +06:30
parent 46bbd90df5
commit 2faf5ba386
4 changed files with 8 additions and 8 deletions

View File

@@ -82,10 +82,10 @@ class DiningFacility < ApplicationRecord
hr = (now.strftime("%H").to_i).to_int
min = (now.strftime("%M").to_i).to_int
if !booking.checkout_at.nil?
checkout_at = booking.checkout_at.utc
checkout_at = booking.checkout_at.utc
checkout_at_hr = (checkout_at.utc.strftime("%H").to_i).to_int
checkout_at_min = (checkout_at.utc.strftime("%M").to_i).to_int
checkout_at_min -= min
# checkout_at_min -= min
if (checkout_at_hr <= hr) && (checkout_at_min <= 15)
return booking
else