This commit is contained in:
BoHung Chiu 2021-10-05 10:16:11 +08:00
parent 97d7d0e90f
commit c902128062
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ class PHire
@end_date = re.end_time @end_date = re.end_time
if @start_date < start_date if @start_date < start_date
if re.recurring_interval == "week" 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 else
@start_date += ((start_date.year * 12 + start_date.month) - (@start_date.year * 12 + @start_date.month) - 1) * interval @start_date += ((start_date.year * 12 + start_date.month) - (@start_date.year * 12 + @start_date.month) - 1) * interval
end end