Gestion des lignes VoIP

This commit is contained in:
Rodolphe Quiedeville 2005-11-07 09:12:02 +00:00
parent bb4ea5382e
commit 251589211f
2 changed files with 11 additions and 10 deletions

View File

@ -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 '</form></td></tr></table>';
}
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<br>\n<div class=\"tabsAction\">\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 "<a class=\"tabAction\" href=\"fiche.php?action=resilier&amp;id=$ligne->id\">".$langs->trans("Demander la résiliation")."</a>";
}
if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 4)
if ( $user->rights->telephonie->ligne->resilier && $ligne->statut == 4 && $ligne->techno == 'presel')
{
print "<a class=\"tabAction\" href=\"fiche.php?action=annuleresilier&amp;id=$ligne->id\">".$langs->trans("Annuler la demande de résiliation")."</a>";
}
@ -1328,8 +1331,6 @@ if ($_GET["action"] == '' && $result == 1 && $client_comm->perm_read)
print "</div>";
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");

View File

@ -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;