Ajout contrle de scurit
This commit is contained in:
parent
2e6be78e78
commit
bc1f78e553
@ -61,6 +61,10 @@ print '<br />';
|
||||
|
||||
$sql = "SELECT distinct statut, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat as l";
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " WHERE l.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
$sql .= " GROUP BY statut";
|
||||
|
||||
if ($db->query($sql))
|
||||
@ -98,46 +102,7 @@ else
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>Contrats</td><td align="center">Nb</td><td> </td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
$contrat = new TelephonieContrat($db);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object();
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".$contrat->statuts[$obj->statut]."</td>\n";
|
||||
print '<td align="center">'.$obj->cc."</td>\n";
|
||||
print '<td><a href="liste.php?statut='.$obj->statut.'">';
|
||||
print '<img border="0" src="statut'.$obj->statut.'.png"></a></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$values[$obj->statut] = $obj->cc;
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
|
||||
print '</td><td valign="top" width="70%">';
|
||||
@ -150,6 +115,10 @@ $sql .= " , ".MAIN_DB_PREFIX."societe as sf";
|
||||
|
||||
$sql .= " WHERE c.fk_client_comm = s.idp";
|
||||
$sql .= " AND c.fk_soc = sf.idp";
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " AND c.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
$sql .= " ORDER BY date_creat DESC LIMIT 10;";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -66,6 +66,11 @@ $sql .= " WHERE c.fk_client_comm = s.idp";
|
||||
$sql .= " AND c.fk_soc = sa.idp";
|
||||
$sql .= " AND c.fk_soc_facture = sf.idp";
|
||||
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " AND c.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
|
||||
if ($socidp > 0)
|
||||
{
|
||||
$sql .= " AND s.idp = ".$socidp;
|
||||
|
||||
@ -52,14 +52,18 @@ function llxHeader($head = "", $title="") {
|
||||
$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");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/distributeurs/", "Distributeurs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ca/", "Chiffre d'affaire");
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
@ -36,37 +36,30 @@ function llxHeader($head = "", $title="") {
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
if (TELEPHONIE_MODULE_ADSL == 1)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/adsl/", "ADSL");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie");
|
||||
|
||||
if (TELEPHONIE_MODULE_SIMULATION == 1)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/simulation/fiche.php", "Simulation");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/simulation/fiche.php?action=create", "Nouvelle");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/contrat/", "Contrats");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$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_submenu(DOL_URL_ROOT."/telephonie/stats/distributeurs/", "Distributeurs");
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/distributeurs/", "Distributeurs");
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/distributeurs/", "Distributeurs");
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT d.nom, d.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_distributeur as d";
|
||||
$sql .= " ORDER BY d.nom ASC";
|
||||
|
||||
@ -50,18 +50,21 @@ function llxHeader($head = "", $title="") {
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/facture/index.php", "Factures");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/facture/liste.php", "Liste");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/facture/check.php", "Verif");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/facture/stats.php", "Stats");
|
||||
//$menu->add_submenu(DOL_URL_ROOT."/telephonie/facture/check.php", "Verif");
|
||||
//$menu->add_submenu(DOL_URL_ROOT."/telephonie/facture/stats.php", "Stats");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/", "Fournisseurs");
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/", "Fournisseurs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ca/", "Chiffre d'affaire");
|
||||
|
||||
|
||||
@ -62,6 +62,10 @@ print '<br />';
|
||||
|
||||
$sql = "SELECT distinct statut, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " WHERE l.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
$sql .= " GROUP BY statut";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@ -98,57 +102,63 @@ else
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
print '<br />';
|
||||
|
||||
/*
|
||||
* Fournisseurs
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT distinct f.nom as fournisseur, f.rowid, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " ,".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||
$sql .= " ,".MAIN_DB_PREFIX."telephonie_fournisseur as f";
|
||||
$sql .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid";
|
||||
$sql .= " GROUP BY f.nom";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
print '<br />';
|
||||
|
||||
/*
|
||||
* Fournisseurs
|
||||
*
|
||||
*/
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>Fournisseur</td><td align="center">Nb lignes</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
$sql = "SELECT distinct f.nom as fournisseur, f.rowid, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " ,".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
|
||||
$sql .= " ,".MAIN_DB_PREFIX."telephonie_fournisseur as f";
|
||||
$sql .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid";
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/telephonie/ligne/liste.php?fournisseur='.$obj->rowid.'">';
|
||||
print $obj->fournisseur.'</a></td>';
|
||||
print '<td align="center">'.$obj->cc."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$sql .= " AND l.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
$sql .= " GROUP BY f.nom";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre"><td>Fournisseur</td><td align="center">Nb lignes</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/telephonie/ligne/liste.php?fournisseur='.$obj->rowid.'">';
|
||||
print $obj->fournisseur.'</a></td>';
|
||||
print '<td align="center">'.$obj->cc."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
|
||||
print '</td><td width="70%" valign="top">';
|
||||
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
|
||||
@ -44,8 +44,11 @@ function llxHeader($head = "", $title="") {
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/contrat/", "Contrats");
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/liste.php", "Lignes");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/liste.php", "Lignes");
|
||||
}
|
||||
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
{
|
||||
@ -57,6 +60,7 @@ function llxHeader($head = "", $title="") {
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/retour/", "Retour");
|
||||
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
|
||||
|
||||
@ -511,7 +511,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
if ( $result == 1)
|
||||
{
|
||||
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
|
||||
{
|
||||
@ -612,7 +612,7 @@ else
|
||||
print $client_facture->nom.'</a><br />';
|
||||
print $client_facture->cp . " " .$client_facture->ville;
|
||||
|
||||
print '</td><td valign="top" rowspan="9">';
|
||||
print '</td><td valign="top" rowspan="8">';
|
||||
|
||||
/* Historique */
|
||||
|
||||
@ -620,7 +620,8 @@ else
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>Date</td>';
|
||||
print '<td>Statut</td>';
|
||||
print '<td>Fournisseur</td>';
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
print '<td>Fournisseur</td>';
|
||||
print '<td>Rapporteur</td>';
|
||||
print '</tr>';
|
||||
$ff = array();
|
||||
@ -668,11 +669,12 @@ else
|
||||
print '<br />'.$row[5];
|
||||
}
|
||||
|
||||
print '</td><td>';
|
||||
print '</td>';
|
||||
|
||||
print $ff[$row[6]];
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
print '<td>'.$ff[$row[6]].'</td>';
|
||||
|
||||
print '</td><td>'. $row[3] . "</td></tr>";
|
||||
print '<td>'. $row[3] . "</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@ -693,22 +695,31 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Fournisseur</td><td>';
|
||||
|
||||
$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur";
|
||||
$sql .= " WHERE commande_active = 1 AND rowid = ".$ligne->fournisseur_id;
|
||||
|
||||
if ( $db->query( $sql) )
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$row = $db->fetch_row();
|
||||
print $row[1];
|
||||
$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur";
|
||||
$sql .= " WHERE commande_active = 1 AND rowid = ".$ligne->fournisseur_id;
|
||||
|
||||
if ( $db->query( $sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
if ( $num > 0 )
|
||||
{
|
||||
$row = $db->fetch_row();
|
||||
print $row[1];
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
print '-';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '<tr><td>PDF détail</td><td>'.$ligne->pdfdetail.'</td></tr>';
|
||||
|
||||
|
||||
@ -740,10 +751,6 @@ else
|
||||
print '<tr><td width="20%">Concurrent précédent</td>';
|
||||
print '<td>'.$ligne->print_concurrent_nom().'</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Communications</td><td>';
|
||||
print '<a href="communications.php?ligne='.$ligne->numero.'">liste</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Factures</td><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/telephonie/facture/liste.php?search_ligne='.$ligne->numero.'">liste</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -79,7 +79,7 @@ if ($_GET["id"] or $_GET["numero"])
|
||||
}
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
if ( $result == 1)
|
||||
{
|
||||
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
|
||||
{
|
||||
@ -160,71 +160,67 @@ if ($_GET["id"] or $_GET["numero"])
|
||||
print '<tr><td width="20%">Modèle de facture utilisé</td><td colspan="2">'.$ligne->pdfdetail.'</td></tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
|
||||
if ($_GET["action"] == 'edit' || $action == 're-edit')
|
||||
{
|
||||
print_fiche_titre('Edition des informations complémentaires de la ligne', $mesg);
|
||||
|
||||
print "<form action=\"infoc.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%">Numéro</td><td>'.$ligne->numero.'</td></tr>';
|
||||
|
||||
$client = new Societe($db, $ligne->client_id);
|
||||
$client->fetch($ligne->client_id);
|
||||
|
||||
print '<tr><td width="20%">Client</td><td colspan="2">'.$client->nom;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Remise LMN</td><td>'.$ligne->remise.' %</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Code Analytique</td><td><input name="code_ana" size="13" maxlength="12" value="'.$ligne->code_analytique.'"> </td></tr>';
|
||||
|
||||
print '<tr><td> </td><td><input type="submit" value="Mettre à jour">';
|
||||
print '<a href="infoc.php?id='.$ligne->id.'">Annuler</a></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print '</div>';
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
print "<br><div class=\"tabsAction\">\n";
|
||||
|
||||
if ($_GET["action"] == '')
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"infoc.php?action=edit&id=$ligne->id\">".$langs->trans("Edit")."</a>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'edit' || $action == 're-edit')
|
||||
{
|
||||
print_fiche_titre('Edition des informations complémentaires de la ligne', $mesg);
|
||||
|
||||
print "<form action=\"infoc.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%">Numéro</td><td>'.$ligne->numero.'</td></tr>';
|
||||
|
||||
$client = new Societe($db, $ligne->client_id);
|
||||
$client->fetch($ligne->client_id);
|
||||
|
||||
print '<tr><td width="20%">Client</td><td colspan="2">'.$client->nom;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Remise LMN</td><td>'.$ligne->remise.' %</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">Code Analytique</td><td><input name="code_ana" size="13" maxlength="12" value="'.$ligne->code_analytique.'"> </td></tr>';
|
||||
|
||||
print '<tr><td> </td><td><input type="submit" value="Mettre à jour">';
|
||||
print '<a href="infoc.php?id='.$ligne->id.'">Annuler</a></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error";
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
print "<br><div class=\"tabsAction\">\n";
|
||||
|
||||
if ($_GET["action"] == '')
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"infoc.php?action=edit&id=$ligne->id\">".$langs->trans("Edit")."</a>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
|
||||
@ -21,6 +21,8 @@
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
if (!$user->rights->telephonie->lire) accessforbidden();
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
@ -69,6 +71,11 @@ $sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f";
|
||||
$sql .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid";
|
||||
$sql .= " AND l.fk_soc_facture = sf.idp";
|
||||
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " AND l.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
|
||||
if ($_GET["search_ligne"])
|
||||
{
|
||||
$sel =urldecode($_GET["search_ligne"]);
|
||||
@ -147,12 +154,11 @@ if ($result)
|
||||
print_liste_field_titre("Ligne","liste.php","l.ligne");
|
||||
print_liste_field_titre("Client (Agence/Filiale)","liste.php","s.nom");
|
||||
|
||||
print '<td>Client facturé</td>';
|
||||
//print '<td>Client facturé</td>';
|
||||
print '<td align="center">Statut</td>';
|
||||
|
||||
print_liste_field_titre("Remise LMN","liste.php","l.remise","","",' align="center"');
|
||||
|
||||
print '<td>Fournisseur</td>';
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
print '<td>Fournisseur</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -160,13 +166,13 @@ if ($result)
|
||||
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="text" name="search_client_facture" value="'. $_GET["search_client_facture"].'" size="10"></td>';
|
||||
|
||||
print '<td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td>';
|
||||
|
||||
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
print '<td> </td>';
|
||||
|
||||
print '</form>';
|
||||
print '</tr>';
|
||||
@ -192,12 +198,12 @@ if ($result)
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne)."</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><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 "<td>".$obj->fournisseur."</td>\n";
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
print "<td>".$obj->fournisseur."</td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -49,9 +49,12 @@ function llxHeader($head = "", $title="") {
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/liste.php", "Liste");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/liste.php", "A commander");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/listecommande.php", "En commande");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/communications.php", "Communications");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/liste.php", "A commander");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/listecommande.php", "En commande");
|
||||
|
||||
// $menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/communications.php", "Communications");
|
||||
|
||||
if (TELEPHONIE_MODULE_GROUPES == 1)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/groupe.php", "Groupes");
|
||||
@ -59,16 +62,18 @@ function llxHeader($head = "", $title="") {
|
||||
if (TELEPHONIE_MODULE_NUMDATA == 1)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/numdata.php", "Numéros data");
|
||||
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/", "Fournisseurs");
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/", "Fournisseurs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ca/", "Chiffre d'affaire");
|
||||
|
||||
|
||||
@ -53,17 +53,20 @@ function llxHeader($head = "", $title="") {
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
|
||||
if ($user->rights->telephonie->ligne_commander)
|
||||
$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");
|
||||
if ($user->rights->telephonie->stats->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/distributeurs/", "Distributeurs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/index.php", "Fournisseurs");
|
||||
if ($user->rights->telephonie->fournisseur->lire)
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/fournisseur/index.php", "Fournisseurs");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/telephonie/service/", "Services");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user