fix error

This commit is contained in:
chiu 2020-05-29 14:44:24 +08:00
parent 7e3141d4f0
commit eb73011ca4
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class Property
diff_month = diff_month + 12 if diff_month < 0
e_month = stime_tp.month + diff_month
e_year = stime_tp.year + (booking.end_time.year-booking.start_time.year)
e_month = e_month - 12
e_month = e_month - 12 if e_month >12
b_sdata = Time.local(stime_tp.year,stime_tp.month,booking.start_time.day,booking.start_time.hour,booking.start_time.minute).to_datetime
b_edata = Time.local(e_year,e_month,booking.end_time.day,booking.end_time.hour,booking.end_time.minute).to_datetime
elsif b_interval == 'week'