2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Save call attempt id in to sent when sent and set default call id

This commit is contained in:
Adam Zammit
2013-02-27 09:28:00 +11:00
parent 11df5b93b5
commit 971eb8d584
2 changed files with 12 additions and 19 deletions

View File

@@ -134,13 +134,17 @@ function display_outcomes($contacted,$ca,$case_id)
print "<div>";
if (!empty($rs))
{
//Get current outcome to set as default
$sql = "SELECT outcome
FROM `call`
WHERE call_attempt_id = $ca
AND `end` IS NULL";
$lime_sid = get_limesurvey_id(get_operator_id());
//Check to see if we have sent an email on this call and set the default outcome
$sql = "SELECT 41
FROM `case` as c, " . LIME_PREFIX . "tokens_$lime_sid as t
WHERE t.sent = '$ca'
AND c.case_id = $case_id
AND t.token = c.token";
$do = $db->GetOne($sql);
if (isset($_GET['defaultoutcome'])) $do = bigintval($_GET['defaultoutcome']);
foreach($rs as $r)
{