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

simplified code, adjusted for customized_outcomes

This commit is contained in:
Alex
2015-11-18 21:58:17 +03:00
parent 384cd149a9
commit eff3a27a25
2 changed files with 21 additions and 38 deletions

View File

@@ -120,24 +120,19 @@ function display_outcomes($contacted,$ca,$case_id)
}
else
{
if ($contacted === false)
{
$sql = "SELECT outcome_id,description
FROM outcome
WHERE outcome_id != 10
AND outcome_id IN ($outcomes)"; //don't show completed if not
}
if ($contacted === false) $ctd = "";
else
{
$contacted = bigintval($contacted);
$sql = "SELECT outcome_id,description
FROM outcome
WHERE contacted = '$contacted'
AND outcome_id != 10
AND outcome_id IN ($outcomes)"; //don't show completed if not
$ctd = "AND contacted = '$contacted'";
}
$sql = "SELECT outcome_id,description
FROM outcome
WHERE outcome_type_id != '5'
$ctd
AND outcome_id IN ($outcomes)
AND outcome_id NOT IN(10,42,43,44,45)"; //don't show completed if not, hide max calls as the supposed to be automatic or admin
}
}
$rs = $db->GetAll($sql);