Modif navigation et register_global
This commit is contained in:
parent
032479759b
commit
cc1db7b69c
@ -279,8 +279,6 @@ else
|
|||||||
print '</td></form></tr></table>';
|
print '</td></form></tr></table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print($mesg);
|
|
||||||
|
|
||||||
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
||||||
$head[0][1] = 'Fiche';
|
$head[0][1] = 'Fiche';
|
||||||
|
|
||||||
@ -290,9 +288,8 @@ else
|
|||||||
$head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
|
$head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
|
||||||
$head[2][1] = 'Statistiques';
|
$head[2][1] = 'Statistiques';
|
||||||
|
|
||||||
|
|
||||||
dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
||||||
|
print($mesg);
|
||||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td width="20%">Référence</td><td width="40%">'.$product->ref.'</td>';
|
print '<td width="20%">Référence</td><td width="40%">'.$product->ref.'</td>';
|
||||||
|
|||||||
@ -42,12 +42,25 @@ llxHeader("","","Prix");
|
|||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$result = $product->fetch($_GET["id"]);
|
$result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
// Zone recherche
|
||||||
|
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<form action="liste.php?type='.$product->type.'" method="post"><td>';
|
||||||
|
print 'Réf : <input class="flat" type="text" size="10" name="sref"> <input class="flat" type="submit" value="go">';
|
||||||
|
print '</td></form><form action="liste.php" method="post"><td>';
|
||||||
|
print 'Libellé : <input class="flat" type="text" size="20" name="snom"> <input class="flat" type="submit" value="go">';
|
||||||
|
print '</td></form></tr></table>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
||||||
$head[0][1] = 'Fiche';
|
$head[0][1] = 'Fiche';
|
||||||
|
|
||||||
$head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
|
$head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
|
||||||
$head[1][1] = 'Prix';
|
$head[1][1] = 'Prix';
|
||||||
|
|
||||||
|
$head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
|
||||||
|
$head[2][1] = 'Statistiques';
|
||||||
|
|
||||||
dolibarr_fiche_head($head, 1, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
dolibarr_fiche_head($head, 1, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -31,10 +31,10 @@ $mesg = '';
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($id)
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$result = $product->fetch($id);
|
$result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
if ( $result )
|
if ( $result )
|
||||||
{
|
{
|
||||||
@ -42,14 +42,14 @@ if ($id)
|
|||||||
|
|
||||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4"><tr>';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4"><tr>';
|
||||||
print '<td width="20%">Référence</td><td width="40%"><a href="../fiche.php?id='.$product->id.'">'.$product->ref.'</a></td>';
|
print '<td width="20%">Référence</td><td width="40%"><a href="../fiche.php?id='.$product->id.'">'.$product->ref.'</a></td>';
|
||||||
print '<td><a href="fiche.php?id='.$id.'">Statistiques</a></td></tr>';
|
print '<td><a href="fiche.php?id='.$product->id.'">Statistiques</a></td></tr>';
|
||||||
print "<tr><td>Libellé</td><td>$product->libelle</td>";
|
print "<tr><td>Libellé</td><td>$product->libelle</td>";
|
||||||
print '<td valign="top" rowspan="2">';
|
print '<td valign="top" rowspan="2">';
|
||||||
print "Propositions commerciales : ".$product->count_propale();
|
print "Propositions commerciales : ".$product->count_propale();
|
||||||
print "<br>Proposé à <b>".$product->count_propale_client()."</b> clients";
|
print "<br>Proposé à <b>".$product->count_propale_client()."</b> clients";
|
||||||
print "<br>Factures : ".$product->count_facture();
|
print "<br>Factures : ".$product->count_facture();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>Prix de vente</td><TD>'.price($product->price).'</td></tr>';
|
print '<tr><td>Prix de vente</td><td>'.price($product->price).'</td></tr>';
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
if ($page == -1)
|
if ($page == -1)
|
||||||
@ -68,11 +68,11 @@ if ($id)
|
|||||||
$sortfield="f.datef";
|
$sortfield="f.datef";
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste("Factures",$page,$PHP_SELF,"&id=$id",$sortfield,$sortorder);
|
print_barre_liste("Factures",$page,$PHP_SELF,"&id=$product->id",$sortfield,$sortorder);
|
||||||
|
|
||||||
$sql = "SELECT distinct(f.rowid), s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
|
$sql = "SELECT distinct(f.rowid), s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as d WHERE f.fk_soc = s.idp";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as d WHERE f.fk_soc = s.idp";
|
||||||
$sql .= " AND d.fk_facture = f.rowid AND d.fk_product =".$id;
|
$sql .= " AND d.fk_facture = f.rowid AND d.fk_product =".$product->id;
|
||||||
$sql .= " ORDER BY $sortfield $sortorder ";
|
$sql .= " ORDER BY $sortfield $sortorder ";
|
||||||
$sql .= $db->plimit( $limit ,$offset);
|
$sql .= $db->plimit( $limit ,$offset);
|
||||||
|
|
||||||
|
|||||||
@ -74,6 +74,16 @@ if ($_GET["id"])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Zone recherche
|
||||||
|
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<form action="liste.php?type='.$product->type.'" method="post"><td>';
|
||||||
|
print 'Réf : <input class="flat" type="text" size="10" name="sref"> <input class="flat" type="submit" value="go">';
|
||||||
|
print '</td></form><form action="liste.php" method="post"><td>';
|
||||||
|
print 'Libellé : <input class="flat" type="text" size="20" name="snom"> <input class="flat" type="submit" value="go">';
|
||||||
|
print '</td></form></tr></table>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
||||||
$head[0][1] = 'Fiche';
|
$head[0][1] = 'Fiche';
|
||||||
|
|||||||
@ -22,6 +22,10 @@
|
|||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
require(DOL_DOCUMENT_ROOT."/bargraph.class.php");
|
require(DOL_DOCUMENT_ROOT."/bargraph.class.php");
|
||||||
|
|
||||||
|
$types[0] = "produit";
|
||||||
|
$types[1] = "service";
|
||||||
|
|
||||||
|
|
||||||
function llxHeader($head = "", $urlp = "")
|
function llxHeader($head = "", $urlp = "")
|
||||||
{
|
{
|
||||||
global $user, $conf;
|
global $user, $conf;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user