From eb73011ca4b279c8b6858d22c6cfd154dbf00c08 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 29 May 2020 14:44:24 +0800 Subject: [PATCH] fix error --- app/models/property.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/property.rb b/app/models/property.rb index 103ae9d..e6a684c 100644 --- a/app/models/property.rb +++ b/app/models/property.rb @@ -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'