diff --git a/htdocs/telephonie/script/commande_presel_statut.php b/htdocs/telephonie/script/commande_presel_statut.php index fef2713cdac..8dcf1f2717d 100644 --- a/htdocs/telephonie/script/commande_presel_statut.php +++ b/htdocs/telephonie/script/commande_presel_statut.php @@ -262,6 +262,31 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids) } } + if ($situation_key == 'TRAITE_OK / ATTENTE') + { + $ligne = new LigneTel($db); + + if ($ligne->fetch($cli) == 1) + { + if ($ligne->statut == 2) + { + $statut = 7; + $date_mise_service = strftime(time()); + $datea = $db->idate($date_mise_service); + + if ($ligne->set_statut($user, $statut, $datea) <> 0) + { + $error++; + print "ERROR\n"; + } + } + } + else + { + print "Erreur de lecture\n"; + } + } + } else {