From 251589211f3806eb4ec6d0b2eab81bd6e4a21172 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 7 Nov 2005 09:12:02 +0000 Subject: [PATCH] Gestion des lignes VoIP --- htdocs/telephonie/ligne/fiche.php | 17 +++++++++-------- htdocs/telephonie/lignetel.class.php | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/telephonie/ligne/fiche.php b/htdocs/telephonie/ligne/fiche.php index 5fe57713010..30f2e828660 100644 --- a/htdocs/telephonie/ligne/fiche.php +++ b/htdocs/telephonie/ligne/fiche.php @@ -701,6 +701,9 @@ else } $db->free(); } + + print " - ".$ligne->techno; + } else { @@ -1174,7 +1177,7 @@ if ( $user->rights->telephonie->ligne_commander && $ligne->statut == 3 ) $db->free(); } - if (sizeof($ff) > 0) + if (sizeof($ff) > 0 && $ligne->techno == 'presel') { /** * Transférer chez un autre fournisseur @@ -1198,7 +1201,7 @@ if ( $user->rights->telephonie->ligne_commander && $ligne->statut == 3 ) -if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 2) +if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 2 && $ligne->techno == 'presel') { $form = new Form($db); @@ -1229,7 +1232,7 @@ if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 2) print ''; } -if ( $user->rights->telephonie->ligne_activer && ( $ligne->statut == 5 || $ligne->statut == 3)) +if ( $user->rights->telephonie->ligne_activer && ( $ligne->statut == 5 || $ligne->statut == 3) && $ligne->techno == 'presel') { /** * Résiliation demandée @@ -1254,7 +1257,7 @@ if ( $user->rights->telephonie->ligne_activer && ( $ligne->statut == 5 || $ligne } -if ( $user->rights->telephonie->ligne->creer && $ligne->statut == 6) +if ( $user->rights->telephonie->ligne->creer && $ligne->statut == 6 && $ligne->techno == 'presel') { /** * A commander @@ -1289,12 +1292,12 @@ print "\n
\n
\n"; if ($_GET["action"] == '' && $result == 1 && $client_comm->perm_read) { - if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 3) + if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 3 && $ligne->techno == 'presel') { print "id\">".$langs->trans("Demander la résiliation").""; } - if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 4) + if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 4 && $ligne->techno == 'presel') { print "id\">".$langs->trans("Annuler la demande de résiliation").""; } @@ -1328,8 +1331,6 @@ if ($_GET["action"] == '' && $result == 1 && $client_comm->perm_read) print "
"; - - $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index 7ae50f43454..6b116977447 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -329,7 +329,7 @@ class LigneTel { $sql .= " , fk_user_creat, fk_user_commande"; $sql .= " , fk_contrat "; $sql .= " , fk_commercial_suiv, fk_commercial_sign"; - $sql .= " , pdfdetail"; + $sql .= " , pdfdetail, techno"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as tl"; if ($id > 0) @@ -365,7 +365,7 @@ class LigneTel { $this->statut = $obj->statut; $this->mode_paiement = $obj->mode_paiement; $this->code_analytique = $obj->code_analytique; - + $this->techno = $obj->techno; $this->user_creat = $obj->fk_user_creat; $this->user_commande = $obj->fk_user_commande;