diff --git a/app/models/property.rb b/app/models/property.rb index 065ab0c..a9adfb1 100644 --- a/app/models/property.rb +++ b/app/models/property.rb @@ -92,7 +92,7 @@ class Property available = false end if available - bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true) + phires.where(:recurring => false) + 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) case interval when 'week' d_step = 1.week