Fixed the date filter of the list

This commit is contained in:
Alejandro Gallardo Escobar 2014-09-15 18:52:29 +02:00
parent 770ccc994e
commit 8057517acd
1 changed files with 4 additions and 1 deletions

View File

@ -311,7 +311,10 @@ if(!empty($groups)) {
}
if (!empty($date_to)) {
$periodically_monthly_w = "type_periodicity = 'monthly' AND (periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_time_to >= '".date('d', strtotime($date_to))."')";
$periodically_monthly_w = "type_periodicity = 'monthly'
AND ((periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_day_to >= '".date('d', strtotime($date_to))."')
OR (periodically_day_from > periodically_day_to
AND (periodically_day_from <= '".date('d', strtotime($date_from))."' OR periodically_day_to >= '".date('d', strtotime($date_to))."')))";
$periodically_weekly_days = array();
$date_from_aux = strtotime($date_from);