Fix bug for last version.
This commit is contained in:
parent
1e18ac077a
commit
9c8c1bd0c4
|
@ -58,7 +58,7 @@ class PHire
|
|||
end
|
||||
|
||||
def self.recurring_event(start_date,end_date,property_id)
|
||||
@recurring_events = self.where(:property_id => property_id, :recurring => true, :recurring_end_date.gte => start_date)
|
||||
@recurring_events = self.where(:property_id => property_id, :recurring_end_date.gte => start_date)
|
||||
@recurring = []
|
||||
@recurring_events.each do |re|
|
||||
case re.recurring_interval
|
||||
|
|
|
@ -100,7 +100,7 @@ class Property
|
|||
available = false
|
||||
end
|
||||
if available
|
||||
bookings = phires.where(:recurring_end_date.gte => stime, :recurring => true)
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue