Fix cannot hire the empty time interval bug caused by the wrong data.

This commit is contained in:
BoHung Chiu 2020-07-20 20:58:24 +08:00
parent 6f3333a857
commit 1e18ac077a
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class Property
available = false
end
if available
bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) + phires.where(:recurring => false,:recurring_end_date => nil) + phires.where(:recurring => false,:recurring_end_date.gte => stime)
bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true)
case interval
when 'week'
d_step = 1.week