From 388ada1ae30ffc9125d39cbb3d41998a7109eee7 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 9 Dec 2021 11:48:22 +0800 Subject: [PATCH] Fix bug. --- app/models/p_hire.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/p_hire.rb b/app/models/p_hire.rb index c05f490..f321833 100644 --- a/app/models/p_hire.rb +++ b/app/models/p_hire.rb @@ -141,7 +141,9 @@ class PHire startt = DateTime.parse(@start_date.strftime("%Y-%m-%d " + unavailable_start_time + Time.zone.to_s)) endt = DateTime.parse(@end_date.strftime("%Y-%m-%d " + unavailable_end_time + Time.zone.to_s)) if !((startt..endt) & (@start_date..@end_date)).blank? - break if (@start_date + interval) > new_end_date + @start_date += interval + @end_date += interval + datet += interval if datet next end end