prevent order append to previous sale
This commit is contained in:
@@ -108,10 +108,10 @@ class DiningFacility < ApplicationRecord
|
||||
return booking
|
||||
elsif (checkout_at_hr == hr && checkout_at_min <= free_time_min)
|
||||
return booking
|
||||
else
|
||||
else
|
||||
return nil
|
||||
end
|
||||
else
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
@@ -135,7 +135,7 @@ class DiningFacility < ApplicationRecord
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
bookings.each do |booking|
|
||||
now = Time.now.utc
|
||||
hr = (now.strftime("%H").to_i).to_int
|
||||
@@ -164,7 +164,7 @@ class DiningFacility < ApplicationRecord
|
||||
#if ENV["SERVER_MODE"] != 'cloud'
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
else
|
||||
else
|
||||
from = ""
|
||||
end
|
||||
ActionCable.server.broadcast "check_in_booking_channel",table: table,from:from
|
||||
@@ -176,7 +176,7 @@ class DiningFacility < ApplicationRecord
|
||||
if table.length > 0
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
else
|
||||
else
|
||||
from = ""
|
||||
end
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
@@ -203,5 +203,5 @@ class DiningFacility < ApplicationRecord
|
||||
end
|
||||
return status
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user