diff --git a/call.php b/call.php index 72b52897..0e871cd2 100644 --- a/call.php +++ b/call.php @@ -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); diff --git a/call_interface2.php b/call_interface2.php index 8b0e627f..6089efdc 100644 --- a/call_interface2.php +++ b/call_interface2.php @@ -114,35 +114,25 @@ function display_outcomes($contacted,$ca,$case_id) //we have an appointment made ... only select appointment ID's $sql = "SELECT outcome_id,description,contacted FROM outcome - WHERE outcome_id = '19'"; //outcome_type_id = '5' + WHERE outcome_type_id = '5' + AND outcome_id IN ($outcomes)"; } else { - if ($contacted === false) - { - print "