From c902128062bb8b08bd09705a75978ecdaf6058b3 Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 5 Oct 2021 10:16:11 +0800 Subject: [PATCH] Fix bug. --- app/models/p_hire.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/p_hire.rb b/app/models/p_hire.rb index bab054f..50c5bcf 100644 --- a/app/models/p_hire.rb +++ b/app/models/p_hire.rb @@ -112,7 +112,7 @@ class PHire @end_date = re.end_time if @start_date < start_date if re.recurring_interval == "week" - @start_date += (start_date - @start_date).to_i / 7) * interval + @start_date += ((start_date - @start_date).to_i / 7) * interval else @start_date += ((start_date.year * 12 + start_date.month) - (@start_date.year * 12 + @start_date.month) - 1) * interval end