Nouveau fichier
This commit is contained in:
parent
53eb32cd05
commit
f5a30909be
814
htdocs/telephonie/contrat/fiche.php
Normal file
814
htdocs/telephonie/contrat/fiche.php
Normal file
@ -0,0 +1,814 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
require "./pre.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/lib/dolibarrmail.class.php";
|
||||
|
||||
$mesg = '';
|
||||
|
||||
$dt = time();
|
||||
|
||||
$h = strftime("%H",$dt);
|
||||
$m = strftime("%M",$dt);
|
||||
$s = strftime("%S",$dt);
|
||||
|
||||
if ($_POST["action"] == 'add')
|
||||
{
|
||||
$contrat = new TelephonieContrat($db);
|
||||
|
||||
$contrat->client_comm = $_POST["client_comm"];
|
||||
$contrat->client = $_POST["client"];
|
||||
$contrat->client_facture = $_POST["client_facture"];
|
||||
$contrat->commercial_sign = $_POST["commercial_sign"];
|
||||
$contrat->note = $_POST["note"];
|
||||
|
||||
if ( $contrat->create($user) == 0)
|
||||
{
|
||||
Header("Location: fiche.php?id=".$contrat->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$_GET["action"] = 'create';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'addcontact')
|
||||
{
|
||||
$ligne = new LigneTel($db);
|
||||
$ligne->id = $_GET["id"];
|
||||
|
||||
if ( $ligne->add_contact($_POST["contact_id"]) )
|
||||
{
|
||||
Header("Location: fiche.php?id=".$ligne->id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$contrat = new TelephonieContrat($db);
|
||||
$contrat->id = $_GET["id"];
|
||||
|
||||
$contrat->delete() ;
|
||||
Header("Location: index.php");
|
||||
}
|
||||
|
||||
|
||||
if ($_GET["action"] == 'delcontact')
|
||||
{
|
||||
$ligne = new LigneTel($db);
|
||||
$ligne->id = $_GET["id"];
|
||||
|
||||
if ( $ligne->del_contact($_GET["contact_id"]) )
|
||||
{
|
||||
Header("Location: fiche.php?id=".$ligne->id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$ligne = new LigneTel($db);
|
||||
$ligne->id = $_GET["id"];
|
||||
|
||||
$ligne->numero = $_POST["numero"];
|
||||
$ligne->client_comm = $_POST["client_comm"];
|
||||
$ligne->client = $_POST["client"];
|
||||
$ligne->client_facture = $_POST["client_facture"];
|
||||
$ligne->fournisseur = $_POST["fournisseur"];
|
||||
$ligne->commercial = $_POST["commercial"];
|
||||
$ligne->concurrent = $_POST["concurrent"];
|
||||
$ligne->remise = $_POST["remise"];
|
||||
$ligne->note = $_POST["note"];
|
||||
|
||||
if ( $ligne->update($user) )
|
||||
|
||||
{
|
||||
$action = '';
|
||||
$mesg = 'Fiche mise à jour';
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = 're-edit';
|
||||
$mesg = 'Fiche non mise à jour !' . "<br>" . $entrepot->mesg_error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
llxHeader("","","Fiche Contrat");
|
||||
|
||||
if ($cancel == $langs->trans("Cancel"))
|
||||
{
|
||||
$action = '';
|
||||
}
|
||||
|
||||
/*
|
||||
* Création en 2 étape
|
||||
*
|
||||
*/
|
||||
if ($_GET["action"] == 'create')
|
||||
{
|
||||
$form = new Form($db);
|
||||
print_titre("Nouveau contrat");
|
||||
|
||||
if (is_object($ligne))
|
||||
{
|
||||
// La création a échouée
|
||||
print $ligne->error_message;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ligne = new LigneTel($db);
|
||||
}
|
||||
|
||||
print '<form action="fiche.php" method="GET">';
|
||||
print '<input type="hidden" name="action" value="create_line">';
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr><td width="20%">Client</td><td >';
|
||||
$ff = array();
|
||||
$sql = "SELECT idp, nom, ville FROM ".MAIN_DB_PREFIX."societe WHERE client=1 ORDER BY nom ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
$ff[$row[0]] = $row[1] . " (".$row[2].")";
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
$form->select_array("client_comm",$ff,$ligne->client_comm);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td> </td><td><input type="submit" value="Créer"></td></tr>'."\n";
|
||||
print '</table>'."\n";
|
||||
print '</form>';
|
||||
}
|
||||
elseif ($_GET["action"] == 'create_line' && $_GET["client_comm"] > 0)
|
||||
{
|
||||
$form = new Form($db);
|
||||
print_titre("Nouveau contrat");
|
||||
|
||||
if (is_object($ligne))
|
||||
{
|
||||
// La création a échouée
|
||||
print $ligne->error_message;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ligne = new LigneTel($db);
|
||||
}
|
||||
|
||||
$socc = new Societe($db);
|
||||
|
||||
if ( $socc->fetch($_GET["client_comm"]) == 1)
|
||||
{
|
||||
|
||||
if (strlen($socc->code_client) == 0)
|
||||
{
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr><td width="20%">Client</td><td >';
|
||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$socc->id.'">'.$socc->nom.'</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Code client</td><td >';
|
||||
print $socc->code_client;
|
||||
print '</td></tr>';
|
||||
print '</table><br /><br />';
|
||||
print 'Impossible de créer un contrat pour cette société, vous devez au préalablement lui affecter un code client.';
|
||||
}
|
||||
elseif (strlen($socc->code_client) > 0 && $socc->check_codeclient() <> 0)
|
||||
{
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr><td width="20%">Client</td><td >';
|
||||
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$socc->id.'">'.$socc->nom.'</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Code client</td><td >';
|
||||
print $socc->code_client;
|
||||
print '</td></tr>';
|
||||
print '</table><br /><br />';
|
||||
print 'Le code client de cette société est incorrect, vous devez lui affecter un code client correct.';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<form action=\"fiche.php\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="client_comm" value="'.$socc->id.'">'."\n";
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr><td width="20%">Client</td><td >';
|
||||
print $socc->nom;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Code client</td><td >';
|
||||
print $socc->code_client;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Client (Agence/Filiale)</td><td >';
|
||||
$ff = array();
|
||||
$sql = "SELECT idp, nom, ville FROM ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " WHERE client=1";
|
||||
$sql .= " AND (idp = $socc->id OR parent = $socc->id)";
|
||||
$sql .= " ORDER BY nom ";
|
||||
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row();
|
||||
$ff[$row[0]] = $row[1] . " (".$row[2].")";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $sql;
|
||||
}
|
||||
$form->select_array("client",$ff,$ligne->client);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Client à facturer</td><td >';
|
||||
$ff = array();
|
||||
$sql = "SELECT idp, nom, ville FROM ".MAIN_DB_PREFIX."societe WHERE client=1";
|
||||
$sql .= " AND (idp = $socc->id OR parent = $socc->id)";
|
||||
$sql .= " ORDER BY nom ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row();
|
||||
$ff[$row[0]] = $row[1] . " (".$row[2].")";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
$form->select_array("client_facture",$ff,$ligne->client_facture);
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
* Commercial
|
||||
*/
|
||||
|
||||
print '<tr><td width="20%">Commercial Signature</td><td >';
|
||||
$ff = array();
|
||||
$sql = "SELECT rowid, name, firstname FROM ".MAIN_DB_PREFIX."user ORDER BY name ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
$ff[$row[0]] = $row[1] . " " . $row[2];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
|
||||
}
|
||||
|
||||
$form->select_array("commercial_sign",$ff,$ligne->commercial);
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%" valign="top">Note</td><td>'."\n";
|
||||
print '<textarea name="note" rows="4" cols="50">'."\n";
|
||||
print stripslashes($ligne->note);
|
||||
print '</textarea></td></tr>'."\n";
|
||||
|
||||
print '<tr><td> </td><td><input type="submit" value="Créer"></td></tr>'."\n";
|
||||
print '</table>'."\n";
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Erreur";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($_GET["id"])
|
||||
{
|
||||
if ($_GET["action"] <> 're-edit')
|
||||
{
|
||||
$contrat = new TelephonieContrat($db);
|
||||
|
||||
if ($contrat->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
$result = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
|
||||
{
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/fiche.php?id=".$contrat->id;
|
||||
$head[$h][1] = $langs->trans("Contrat");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref);
|
||||
|
||||
print_fiche_titre('Fiche Contrat', $mesg);
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
$client_comm = new Societe($db, $contrat->client_comm_id);
|
||||
$client_comm->fetch($contrat->client_comm_id);
|
||||
|
||||
print '<tr><td width="20%">Référence</td><td>'.$contrat->ref.'</td>';
|
||||
print '<td>Facturé : '.$contrat->facturable.'</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Client</td><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$client_comm->id.'">';
|
||||
|
||||
print $client_comm->nom.'</a></td><td>'.$client_comm->code_client;
|
||||
print '</td></tr>';
|
||||
|
||||
$client = new Societe($db, $contrat->client_id);
|
||||
$client->fetch($contrat->client_id);
|
||||
|
||||
print '<tr><td width="20%">Client (Agence/Filiale)</td><td colspan="2">';
|
||||
print $client->nom.'<br />';
|
||||
|
||||
print $client->cp . " " .$client->ville;
|
||||
print '</td></tr>';
|
||||
|
||||
$client_facture = new Societe($db);
|
||||
$client_facture->fetch($contrat->client_facture_id);
|
||||
|
||||
print '<tr><td width="20%">Client Facturé</td><td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid=';
|
||||
print $client_facture->id.'">';
|
||||
print $client_facture->nom.'</a><br />';
|
||||
print $client_facture->cp . " " .$client_facture->ville;
|
||||
|
||||
print '</td><td>';
|
||||
|
||||
if ($contrat->mode_paiement == 'pre')
|
||||
{
|
||||
print 'RIB : '.$client_facture->display_rib();
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'Paiement par virement';
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
$commercial = new User($db, $contrat->commercial_sign_id);
|
||||
$commercial->fetch();
|
||||
|
||||
print '<tr><td width="20%">Commercial Signature</td>';
|
||||
print '<td colspan="2">'.$commercial->fullname.'</td></tr>';
|
||||
|
||||
$commercial_suiv = new User($db, $contrat->commercial_suiv_id);
|
||||
$commercial_suiv->fetch();
|
||||
|
||||
print '<tr><td width="20%">Commercial Suivi</td>';
|
||||
print '<td colspan="2">'.$commercial_suiv->fullname.'</td></tr>';
|
||||
|
||||
|
||||
/*
|
||||
print '<tr><td width="20%">Statut</td><td colspan="2">';
|
||||
print '<img src="./graph'.$contrat->statut.'.png"> ';
|
||||
print $contrat->statuts[$contrat->statut];
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
|
||||
/* Contacts
|
||||
|
||||
$sql = "SELECT c.idp, c.name, c.firstname, c.email ";
|
||||
$sql .= "FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql .= ",".MAIN_DB_PREFIX."telephonie_contact_facture as cf";
|
||||
$sql .= " WHERE c.idp = cf.fk_contact AND cf.fk_contrat = ".$contrat->id." ORDER BY name ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
|
||||
print '<tr><td valign="top" width="20%">Contact facture '.$i.'</td>';
|
||||
print '<td valign="top" colspan="2">'.$row[1] . " " . $row[2] . " <".$row[3]."></td></tr>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $sql;
|
||||
}
|
||||
|
||||
Fin Contacts */
|
||||
|
||||
|
||||
print "</table><br />";
|
||||
/* Lignes */
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
$sql = "SELECT l.ligne, f.nom as fournisseur, l.statut, l.rowid, l.remise, ss.nom as agence";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as ss";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f";
|
||||
$sql .= " WHERE l.fk_fournisseur = f.rowid";
|
||||
$sql .= " AND l.fk_soc = ss.idp ";
|
||||
$sql .= " AND l.fk_contrat = ".$contrat->id;
|
||||
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$numlignes = $db->num_rows();
|
||||
if ( $numlignes > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
$ligne = new LigneTel($db);
|
||||
|
||||
print '<tr class="liste_titre"><td width="15%" valign="center">Ligne';
|
||||
print '</td><td>Agence/Filiale</td><td align="center">Statut</td><td align="center">Remise LMN';
|
||||
print '</td><td>Fournisseur</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $numlignes)
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<img src="../graph'.$obj->statut.'.png"> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_file();
|
||||
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne)."</a></td>\n";
|
||||
|
||||
print '<td>'.$obj->agence."</td>\n";
|
||||
print '<td align="center">'.$ligne->statuts[$obj->statut]."</td>\n";
|
||||
|
||||
print '<td align="center">'.$obj->remise." %</td>\n";
|
||||
print "<td>".$obj->fournisseur."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $sql;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Edition
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($_GET["action"] == 'edit' || $action == 're-edit')
|
||||
{
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/fiche.php?id=".$contrat->id;
|
||||
$head[$h][1] = $langs->trans("Contrat");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref);
|
||||
|
||||
print_fiche_titre('Edition du contrat', $mesg);
|
||||
|
||||
print "<form action=\"fiche.php?id=$ligne->id\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr><td width="20%">Référence</td><td>'.$contrat->ref.'</td>';
|
||||
print '<td>Facturé : '.$contrat->facturable.'</td></tr>';
|
||||
|
||||
$client_comm = new Societe($db, $contrat->client_comm_id);
|
||||
$client_comm->fetch($contrat->client_comm_id);
|
||||
|
||||
print '<tr><td width="20%">Client</td><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$client_comm->id.'">';
|
||||
|
||||
print $client_comm->nom.'</a></td><td>'.$client_comm->code_client;
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr><td width="20%">Client (Agence/Filiale)</td><td colspan="2">';
|
||||
print '<select name="client">';
|
||||
|
||||
$sql = "SELECT idp, nom, ville FROM ".MAIN_DB_PREFIX."societe WHERE client=1";
|
||||
$sql .= " AND (idp = $client_comm->id OR parent = $client_comm->id)";
|
||||
$sql .= " ORDER BY nom ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
print '<option value="'.$row[0] .'"';
|
||||
if ($row[0] == $contrat->client_id)
|
||||
{
|
||||
print " SELECTED";
|
||||
}
|
||||
print '>'.stripslashes($row[1]). " (".stripslashes($row[2]).")";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
|
||||
print '</select></td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Client à facturer</td><td colspan="2">'."\n";
|
||||
print '<select name="client_facture">'."\n";
|
||||
|
||||
|
||||
$sql = "SELECT idp, nom,ville FROM ".MAIN_DB_PREFIX."societe WHERE client=1 ";
|
||||
$sql .= " AND (idp = $client_comm->id OR parent = $client_comm->id)";
|
||||
$sql .= " ORDER BY nom ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
print '<option value="'.$row[0] .'"';
|
||||
if ($row[0] == $contrat->client_facture_id)
|
||||
{
|
||||
print " SELECTED";
|
||||
}
|
||||
print '>'.stripslashes($row[1]). " (".stripslashes($row[2]).")";
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
|
||||
print '</select></td></tr>';
|
||||
|
||||
/*
|
||||
* Commercial
|
||||
*/
|
||||
|
||||
$commercial = new User($db, $contrat->commercial_sign_id);
|
||||
$commercial->fetch();
|
||||
|
||||
print '<tr><td width="20%">Commercial Signature</td>';
|
||||
print '<td colspan="2">'.$commercial->fullname.'</td></tr>';
|
||||
|
||||
print "\n".'<tr><td width="20%">Commercial Suivi</td><td colspan="2">';
|
||||
print '<select name="commercial_suiv">';
|
||||
|
||||
$sql = "SELECT rowid, name, firstname FROM ".MAIN_DB_PREFIX."user ORDER BY name ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
print '<option value="'.$row[0] .'"';
|
||||
if ($row[0] == $contrat->commercial_suiv_id)
|
||||
{
|
||||
print " SELECTED";
|
||||
}
|
||||
print '>'.$row[1]." ".$row[2];
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
|
||||
print '</select></td></tr>';
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print '<tr><td width="20%" valign="top">Note</td><td colspan="2">';
|
||||
print '<textarea name="note" rows="4" cols="50">';
|
||||
print "</textarea></td></tr>";
|
||||
|
||||
print '<tr><td align="center" colspan="3"><input type="submit" value="Mettre à jour">';
|
||||
print '<a class="tabAction" href="fiche.php?id='.$contrat->id.'">Annuler</a></td></tr>';
|
||||
print '</table>'."\n";
|
||||
print '</form>'."\n";
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Contact
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($_GET["action"] == 'contact')
|
||||
{
|
||||
print_fiche_titre('Ajouter un contact', $mesg);
|
||||
|
||||
print "<form action=\"fiche.php?id=$ligne->id\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="action" value="addcontact">';
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
|
||||
$sql = "SELECT c.idp, c.name, c.firstname, c.email ";
|
||||
$sql .= "FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql .= ",".MAIN_DB_PREFIX."telephonie_contact_facture as cf";
|
||||
$sql .= " WHERE c.idp = cf.fk_contact AND cf.fk_ligne = ".$ligne->id." ORDER BY name ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
|
||||
print '<tr><td valign="top" width="20%">Contact facture '.$i.'</td>';
|
||||
print '<td valign="top">'.$row[1] . " " . $row[2] . " <".$row[3].">";
|
||||
print '</td><td>';
|
||||
print '<a href="fiche.php?id='.$ligne->id.'&action=delcontact&contact_id='.$row[0].'">';
|
||||
print img_delete();
|
||||
print "</a></td></tr>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $sql;
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td valign="top" width="20%">Contact</td><td valign="top" colspan="2">';
|
||||
|
||||
$sql = "SELECT idp, name, firstname, email FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = ".$ligne->client_facture_id." ORDER BY name ";
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
print '<select name="contact_id">';
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($i);
|
||||
print '<option value="'.$row[0] .'"';
|
||||
print '>'.$row[1] . " " . $row[2] . " <".$row[3].">";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$db->free();
|
||||
print '</select>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $sql;
|
||||
}
|
||||
|
||||
print '<p>Contact auquel est envoyé la facture par email</p></td></tr>';
|
||||
|
||||
print '<tr><td> </td><td>';
|
||||
if ($num > 0)
|
||||
{
|
||||
print '<input type="submit" value="Ajouter">';
|
||||
}
|
||||
print '<a href="fiche.php?id='.$ligne->id.'">Annuler</a></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print '</div>';
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error";
|
||||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
print "\n<br>\n<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($_GET["action"] == '')
|
||||
{
|
||||
|
||||
if ($user->rights->telephonie->ligne->creer)
|
||||
{
|
||||
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?action=create&contratid='.$contrat->id.'">Nouvelle ligne</a>';
|
||||
}
|
||||
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?action=contact&id=$contrat->id\">".$langs->trans("Contact")."</a>";
|
||||
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?action=edit&id=$contrat->id\">".$langs->trans("Edit")."</a>";
|
||||
|
||||
if ($user->rights->telephonie->ligne->creer && $numlignes == 0)
|
||||
{
|
||||
print "<a class=\"butDelete\" href=\"fiche.php?action=delete&id=$contrat->id\">".$langs->trans("Delete")."</a>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
174
htdocs/telephonie/contrat/index.php
Normal file
174
htdocs/telephonie/contrat/index.php
Normal file
@ -0,0 +1,174 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
|
||||
if (!$user->rights->telephonie->lire)
|
||||
accessforbidden();
|
||||
|
||||
llxHeader('','Telephonie - Contrats');
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
$socidp = $user->societe_id;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr><td width="30%" valign="top">';
|
||||
|
||||
print '<form method="GET" action="'.DOL_URL_ROOT.'/telephonie/contrat/liste.php">';
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>Recherche contrat</td>';
|
||||
print "</tr>\n";
|
||||
print "<tr $bc[1]>";
|
||||
print '<td>Numéro <input name="search_contrat" size="12"></td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br />';
|
||||
|
||||
|
||||
$sql = "SELECT distinct statut, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat as l";
|
||||
$sql .= " GROUP BY statut";
|
||||
|
||||
if ($db->query($sql))
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
$ligne = new LigneTel($db);
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>Contrats</td><td valign="center">Nb</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object();
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>Contrats ".$statut."</td>\n";
|
||||
print "<td>".$obj->cc."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$values[$obj->statut] = $obj->cc;
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
print '<br />';
|
||||
|
||||
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '</td><td valign="top" width="70%" rowspan="3">';
|
||||
|
||||
$sql = "SELECT c.ref, c.rowid, s.idp as socidp, sf.idp as sfidp, sf.nom as nom_facture,s.nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat as c";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as sf";
|
||||
|
||||
$sql .= " WHERE c.fk_client_comm = s.idp";
|
||||
$sql .= " AND c.fk_soc = sf.idp";
|
||||
$sql .= " ORDER BY date_creat DESC LIMIT 10";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td>Référence</td>';
|
||||
print '<td>Client (Agence/Filiale)</td>';
|
||||
print '<td>Client facturé</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
|
||||
$ligne = new LigneTel($db);
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_file();
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socidp.'">'.stripslashes($obj->nom).'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->sfidp.'">'.stripslashes($obj->nom_facture).'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
176
htdocs/telephonie/contrat/liste.php
Normal file
176
htdocs/telephonie/contrat/liste.php
Normal file
@ -0,0 +1,176 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
|
||||
llxHeader('','Telephonie - Contrats - Liste');
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
$socidp = $user->societe_id;
|
||||
}
|
||||
|
||||
if ($sortorder == "") {
|
||||
$sortorder="ASC";
|
||||
}
|
||||
if ($sortfield == "") {
|
||||
$sortfield="c.statut";
|
||||
}
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
$sql = "SELECT c.rowid, c.ref, s.idp as socidp, sf.idp as sfidp, sf.nom as nom_facture,s.nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat as c";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as sf";
|
||||
|
||||
$sql .= " WHERE c.fk_client_comm = s.idp";
|
||||
$sql .= " AND c.fk_soc = sf.idp";
|
||||
|
||||
|
||||
if ($_GET["search_ligne"])
|
||||
{
|
||||
$sel =urldecode($_GET["search_ligne"]);
|
||||
$sel = ereg_replace("\.","",$sel);
|
||||
$sel = ereg_replace(" ","",$sel);
|
||||
$sql .= " AND l.ligne LIKE '%".$sel."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_client"])
|
||||
{
|
||||
$sel =urldecode($_GET["search_client"]);
|
||||
$sql .= " AND s.nom LIKE '%".$sel."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_client_facture"])
|
||||
{
|
||||
$sel =urldecode($_GET["search_client_facture"]);
|
||||
$sql .= " AND sf.nom LIKE '%".$sel."%'";
|
||||
}
|
||||
|
||||
if (strlen($_GET["statut"]))
|
||||
{
|
||||
$sql .= " AND l.statut = ".$_GET["statut"];
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
$urladd= "&statut=".$_GET["statut"];
|
||||
|
||||
print_barre_liste("Contrats", $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print_liste_field_titre("Ref","liste.php","c.ref");
|
||||
print_liste_field_titre("Client (Agence/Filiale)","liste.php","s.nom");
|
||||
|
||||
print '<td>Client facturé</td>';
|
||||
print '<td align="center">Statut</td>';
|
||||
|
||||
print_liste_field_titre("Remise LMN","liste.php","l.remise","","",' align="center"');
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<form action="liste.php" method="GET">';
|
||||
print '<td><input type="text" name="search_ligne" value="'. $_GET["search_ligne"].'" size="10"></td>';
|
||||
print '<td><input type="text" name="search_client" value="'. $_GET["search_client"].'" size="10"></td>';
|
||||
print '<td><input type="text" name="search_client_facture" value="'. $_GET["search_client_facture"].'" size="10"></td>';
|
||||
|
||||
print '<td><input type="submit" value="Chercher"></td>';
|
||||
|
||||
|
||||
print '<td> </td>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$var=True;
|
||||
|
||||
$ligne = new LigneTel($db);
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/ligne/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_file();
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$obj->socidp.'">'.stripslashes($obj->nom).'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->sfidp.'">'.stripslashes($obj->nom_facture).'</a></td>';
|
||||
|
||||
print '<td align="center">'.$ligne->statuts[$obj->statut]."</td>\n";
|
||||
|
||||
print '<td align="center">'.$obj->remise." %</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
69
htdocs/telephonie/contrat/pre.inc.php
Normal file
69
htdocs/telephonie/contrat/pre.inc.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
require("../../main.inc.php");
|
||||
|
||||
require(DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php");
|
||||
require(DOL_DOCUMENT_ROOT."/telephonie/telephonie.contrat.class.php");
|
||||
|
||||
$user->getrights('telephonie');
|
||||
|
||||
function llxHeader($head = "", $title="") {
|
||||
global $user, $conf;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/simulation/fiche.php", "Simulation");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/contrat/", "Contrats");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/contrat/liste.php", "Liste");
|
||||
|
||||
if ($user->rights->telephonie->ligne->creer)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/contrat/fiche.php?action=create", "Nouveau contrat");
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/statca/", "Chiffre d'affaire");
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user