From a3ca8d5fe5a3c00713e2009ea50ca65db4ad324d Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Mon, 3 Jul 2017 10:32:43 +1000 Subject: [PATCH] Fixed issue: Display appointments failing if call attempt auto removed (supervisor page) --- admin/supervisor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/supervisor.php b/admin/supervisor.php index c6d23479..063e14b3 100644 --- a/admin/supervisor.php +++ b/admin/supervisor.php @@ -373,7 +373,8 @@ if ($case_id != false) MIN(CONCAT('  ')) as link, MIN(CONCAT('  ')) as edit FROM appointment as a - JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc, operator as co) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id) + JOIN (`case` as c, respondent as r, questionnaire as q, operator as co) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id) + LEFT JOIN (call_attempt as cc, operator as oo) on (a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id) LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id) WHERE c.case_id = '$case_id' AND co.operator_id = '$operator_id'