fix error
This commit is contained in:
parent
02f46d90e2
commit
d159171993
|
@ -105,6 +105,9 @@ class Property
|
||||||
stime_tp = stime
|
stime_tp = stime
|
||||||
etime_tp = etime
|
etime_tp = etime
|
||||||
b_interval = booking.recurring_interval
|
b_interval = booking.recurring_interval
|
||||||
|
if (b_interval == 'month' || b_interval == 'week') && booking.recurring_end_date.nil?
|
||||||
|
b_interval = nil
|
||||||
|
end
|
||||||
if b_interval == 'month'
|
if b_interval == 'month'
|
||||||
b_sdata = booking.start_time.day*10000 + booking.start_time.hour*100 + booking.start_time.minute
|
b_sdata = booking.start_time.day*10000 + booking.start_time.hour*100 + booking.start_time.minute
|
||||||
b_edata = booking.end_time.day*10000 + booking.end_time.hour*100 + booking.end_time.minute
|
b_edata = booking.end_time.day*10000 + booking.end_time.hour*100 + booking.end_time.minute
|
||||||
|
@ -126,9 +129,9 @@ class Property
|
||||||
sdata = stime_tp
|
sdata = stime_tp
|
||||||
edata = etime_tp
|
edata = etime_tp
|
||||||
end
|
end
|
||||||
if (sdata <= b_sdata && edata >= b_sdata) || (sdata >= b_sdata && edata <= b_edata) || (sdata <= b_edata && edata >= b_edata)
|
if etime_tp > booking.start_time
|
||||||
if etime_tp > booking.start_time
|
if (sdata <= b_sdata && edata >= b_sdata) || (sdata >= b_sdata && edata <= b_edata) || (sdata <= b_edata && edata >= b_edata)
|
||||||
available = false
|
available = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
stime_tp = stime_tp + d_step
|
stime_tp = stime_tp + d_step
|
||||||
|
|
Loading…
Reference in New Issue