mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Added calls by timeslot report
This commit is contained in:
@@ -319,7 +319,29 @@ if ($case_id != false)
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("start","des","phone","link","firstName"),array(T_("Date/Time"),T_("Outcome"),T_("Phone number"),T_("Change outcome"),T_("Operator")));
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT count(*)
|
||||
FROM questionnaire_timeslot as q, `case` as c
|
||||
WHERE c.case_id = $case_id
|
||||
AND c.questionnaire_id = q.questionnaire_id";
|
||||
|
||||
if ($db->GetOne($sql) >= 1)
|
||||
{
|
||||
print "<h3>" . T_("Calls by timeslot") . "</h3>";
|
||||
print "<p>" . T_("(excludes Not attempted or worked)") . "<p>";
|
||||
|
||||
$sql = "SELECT ag.description, (SELECT COUNT(*) FROM availability as a, `call` as ca WHERE ca.outcome_id != 1 AND ca.case_id = c.case_id AND a.availability_group_id = ag.availability_group_id
|
||||
AND (a.day_of_week = DAYOFWEEK(CONVERT_TZ(ca.start,'UTC','Australia/Victoria'))
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' , 'Australia/Victoria')) >= a.start
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' ,'Australia/Victoria')) <= a.end)) as cou
|
||||
FROM availability_group as ag, `case` as c, `questionnaire_timeslot` as qt
|
||||
WHERE c.case_id = 24
|
||||
AND qt.questionnaire_id = c.questionnaire_id AND ag.availability_group_id = qt.availability_group_id";
|
||||
|
||||
xhtml_table($db->GetAll($sql),array('description','cou'),array(T_("Time slot"),T_("Calls")));
|
||||
|
||||
}
|
||||
|
||||
//view notes
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note, CONCAT('<a href=\'?case_id=$case_id&case_note_id=', c.case_note_id, '\'>". TQ_("Delete") . "</a>') as link
|
||||
FROM `case_note` as c
|
||||
@@ -418,7 +440,6 @@ if ($case_id != false)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//assign this to an operator for their next case
|
||||
print "<h3>" . T_("Assign this case to operator (will appear as next case for them)") . "</h3>";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user