From 9aec4088a81b7f4479be1c6dbc961f563db1b1ee Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 4 Feb 2014 16:55:03 +0530 Subject: [PATCH] CRM-14099 : added support for months in scheduled reminder --- CRM/Core/BAO/ActionSchedule.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 5bfedcecdc..f514cde058 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -1059,6 +1059,12 @@ GROUP BY c.id elseif ($actionSchedule->repetition_frequency_unit == 'week') { $hrs = 24 * $actionSchedule->repetition_frequency_interval * 7; } + elseif ($actionSchedule->repetition_frequency_unit == 'month') { + $hrs = "24*(DATEDIFF(DATE_ADD(latest_log_time, INTERVAL 1 MONTH ), latest_log_time))"; + } + elseif ($actionSchedule->repetition_frequency_unit == 'year') { + $hrs = "24*(DATEDIFF(DATE_ADD(latest_log_time, INTERVAL 1 YEAR ), latest_log_time))"; + } else { $hrs = $actionSchedule->repetition_frequency_interval; } -- 2.25.1