diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index d6a300d2..9cb7b8a0 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -1538,7 +1538,12 @@ if ($ACTION == 'updateDISPO') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } - if ( ($auto_dial_level > 0) and ( ($dispo_choice=='N') or ($dispo_choice=='B') or ($dispo_choice=='DC') ) ) + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) { $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; if ($DB) {echo "$stmt\n";} @@ -1552,6 +1557,12 @@ if ($ACTION == 'updateDISPO') $rslt=mysql_query($stmt, $link); } } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; }