From 35ad01f9b7c7571fe2033b5d491989e44800d77a Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 13 Jul 2004 14:00:29 +0000 Subject: [PATCH] Corrections pour register_glo --- htdocs/product/fiche.php | 110 ++++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index b383fb91e64..24fa6740d55 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -233,12 +233,12 @@ if ($action == 'create') } else { - if ($id) + if ($_GET["id"]) { if ($action <> 're-edit') { $product = new Product($db); - $result = $product->fetch($id); + $result = $product->fetch($_GET["id"]); } if ( $result ) @@ -267,6 +267,10 @@ else $head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; $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, 0, 'Fiche '.$types[$product->type].' : '.$product->ref); print ''; @@ -282,8 +286,8 @@ else print "Cet article n'est pas en vente"; } print ''; - print ""; - print ''; + print ''; + print ''; if ($product->type == 1) { $nblignefour=4; @@ -291,11 +295,11 @@ else $nblignefour=3; } print '
Libellé$product->libelleStatistiques
Libellé'.$product->libelle.'
Prix de vente'.price($product->price).''; - print 'Fournisseurs [Ajouter]'; + print 'Fournisseurs [Ajouter]'; $sql = "SELECT s.nom, s.idp"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur as pf"; - $sql .=" WHERE pf.fk_soc = s.idp AND pf.fk_product =$id"; + $sql .=" WHERE pf.fk_soc = s.idp AND pf.fk_product = ".$product->id; $sql .= " ORDER BY lower(s.nom)"; if ( $db->query($sql) ) @@ -370,54 +374,54 @@ else print "
\n"; - if ($action == 'edit_price' && $user->rights->produit->creer) - { - print '
Nouveau prix
'; - print "
\n"; - print ''; - print ''; - print ''; - print ''; - print '
Prix de vente
 '; - print '
'; - print '
'; - } - - /* - * Ajouter un fournisseur - * - */ - if ($action == 'ajout_fourn' && $user->rights->produit->creer) - { - print_titre ("Ajouter un fournisseur"); - print "
\n"; - print ''; - print ''; - print ''; - print ''; - print '
FournisseursRéférence
 '; - print '
'; - print '
'; - } - + if ($action == 'edit_price' && $user->rights->produit->creer) + { + print '
Nouveau prix
'; + print "
\n"; + print ''; + print ''; + print ''; + print ''; + print '
Prix de vente
 '; + print '
'; + print '
'; } - + + /* + * Ajouter un fournisseur + * + */ + if ($action == 'ajout_fourn' && $user->rights->produit->creer) + { + print_titre ("Ajouter un fournisseur"); + print "
\n"; + print ''; + print ''; + print ''; + print ''; + print '
FournisseursRéférence
 '; + print '
'; + print '
'; + } + + } + /* * Fiche en mode edition */