From 000a22466c2de0cc8ddeb064d8865314d186bd40 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Jul 2015 18:34:42 +0300 Subject: [PATCH] Show only "not completed" missed appointments --- admin/displayappointments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/displayappointments.php b/admin/displayappointments.php index b9b5c95d..2b2d60d4 100644 --- a/admin/displayappointments.php +++ b/admin/displayappointments.php @@ -261,7 +261,7 @@ else { FROM appointment as a JOIN (`case` as c, respondent as r, questionnaire as q, `sample` as s, sample_import as si) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and s.sample_id = c.sample_id and s.import_id= si.sample_import_id) LEFT JOIN (`call` as ca) ON (ca.call_id = a.completed_call_id) - WHERE q.enabled=1 AND si.enabled = 1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL + WHERE q.enabled=1 AND si.enabled = 1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id !=10 GROUP BY c.case_id ORDER BY a.start ASC";