From dcdd320f7e6a49ff86be9f1ffa84b6a2d4774701 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Aug 2004 15:22:57 +0000 Subject: [PATCH] =?UTF-8?q?Qual:=20Utilisation=20du=20style=20formsearch?= =?UTF-8?q?=20pour=20tous=20les=20onglets=20de=20la=20fiche=20produit=20Do?= =?UTF-8?q?c:=20Mise=20=E0=20jour=20doc=20doxygen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php | 51 ++++++++++++------- htdocs/product/pre.inc.php | 11 ++++- htdocs/product/price.php | 62 ++++++++++++++++------- htdocs/product/stats/fiche.php | 71 +++++++++++++++++--------- htdocs/product/stock/pre.inc.php | 10 ++++ htdocs/product/stock/product.php | 85 ++++++++++++++++++++++---------- 6 files changed, 202 insertions(+), 88 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 7531c485414..db2717328de 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -21,6 +21,13 @@ * */ +/*! + \file htdocs/product/fiche.php + \ingroup product + \brief Page de la fiche produit + \version $Revision$ +*/ + require("./pre.inc.php"); require("../propal.class.php"); require("../facture.class.php"); @@ -38,6 +45,10 @@ if (!$user->rights->produit->lire) } +$types[0] = $langs->trans("Product"); +$types[1] = $langs->trans("Service"); + + if ($_POST["action"] == 'add' && $user->rights->produit->creer) { $product = new Product($db); @@ -301,34 +312,38 @@ else */ // Zone recherche - print '
'; print '
'; - print ''; - print $langs->trans("Ref").':  '; - - print 'Libellé :  '; + print $langs->trans("Ref").':    '; + print $langs->trans("Label").':  '; print '
'; - - $head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; - $head[0][1] = 'Fiche'; + $h=0; + + $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Card"); + $hselected = $h; + $h++; - $head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[1][1] = $langs->trans("Price"); - $h = 2; - if($product->type == 0) - { - $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; - $head[$h][1] = 'Stock'; - $h++; - } + $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; + $head[$h][1] = $langs->trans("Price"); + $h++; + + if($product->type == 0) + { + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = 'Stock'; + $h++; + } $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][1] = $langs->trans('Statistics'); + $h++; + + + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); - dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref); print($mesg); print ''; diff --git a/htdocs/product/pre.inc.php b/htdocs/product/pre.inc.php index f5fc8ed6a8b..85a07dbe712 100644 --- a/htdocs/product/pre.inc.php +++ b/htdocs/product/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -19,10 +20,16 @@ * $Source$ * */ + +/*! + \file htdocs/pre.inc.php + \ingroup product,service + \brief Fichier gestionnaire du menu gauche des produits et services + \version $Revision$ +*/ + require("../main.inc.php"); -$types[0] = "produit"; -$types[1] = "service"; function llxHeader($head = "", $urlp = "", $title="") { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 8a09366f16d..82cd1616257 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -20,6 +20,14 @@ * $Source$ * */ + +/*! + \file htdocs/product/price.php + \ingroup product + \brief Page de la fiche produit + \version $Revision$ +*/ + require("./pre.inc.php"); $langs->load("products"); @@ -29,6 +37,11 @@ $user->getrights('produit'); if (!$user->rights->produit->lire) accessforbidden(); + +$types[0] = $langs->trans("Product"); +$types[1] = $langs->trans("Service"); + + if ($action == 'update') { $sql = "UPDATE ".MAIN_DB_PREFIX."product SET description='$desc' where rowid = $rowid"; @@ -45,27 +58,40 @@ llxHeader("","","Prix"); $product = new Product($db); $result = $product->fetch($_GET["id"]); - // Zone recherche - print '
'; - print ''; - print '
'; - print $langs->trans("Ref").' :  '; - print '
'; - print 'Libellé :  '; - print '
'; - print '
'; -$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; -$head[0][1] = 'Fiche'; - -$head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; -$head[1][1] = $langs->trans("Price"); - -$head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; -$head[2][1] = $langs->trans("Statistics"); +// Zone recherche +print '
'; +print '
'; +print ''; +print $langs->trans("Ref").':    '; +print $langs->trans("Label").':  '; +print '
'; -dolibarr_fiche_head($head, 1, 'Fiche '.$types[$product->type].' : '.$product->ref); +$h=0; + +$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; +$head[$h][1] = $langs->trans("Card"); +$h++; + +$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; +$head[$h][1] = $langs->trans("Price"); +$hselected=$h; +$h++; + +if($product->type == 0) +{ + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = 'Stock'; + $h++; +} + +$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; +$head[$h][1] = $langs->trans("Statistics"); +$h++; + + +dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); $sql = "SELECT p.rowid, p.price, ".$db->pdate("p.date_price")." as dp"; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 35ad1719a82..12f79e2c3c2 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -20,9 +20,23 @@ * $Source$ * */ + +/*! + \file htdocs/product/product.php + \ingroup product + \brief Page des stats produits + \version $Revision$ +*/ + require("./pre.inc.php"); require("../../propal.class.php"); +$langs->load("products"); + +$types[0] = $langs->trans("Product"); +$types[1] = $langs->trans("Service"); + + if ($user->societe_id > 0) { $action = ''; @@ -87,25 +101,39 @@ if ($_GET["id"]) } // Zone recherche - print ''; - print ''; - print '
'; - print $langs->trans("Ref").' :  '; - print '
'; - print 'Libellé :  '; - print '
'; - print '
'; + print '
'; + print '
'; + print ''; + print $langs->trans("Ref").':    '; + print $langs->trans("Label").':  '; + print '
'; + - $head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; - $head[0][1] = 'Fiche'; - - $head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[1][1] = $langs->trans("Price"); - - $head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; - $head[2][1] = $langs->trans("Statistics"); - - dolibarr_fiche_head($head, 2, 'Fiche '.$types[$product->type].' : '.$product->ref); + $h=0; + + $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Card"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; + $head[$h][1] = $langs->trans("Price"); + $h++; + + if($product->type == 0) + { + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = 'Stock'; + $h++; + } + + $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Statistics"); + $hselected=$h; + $h++; + + + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); + print ''; print ''; @@ -179,12 +207,7 @@ if ($_GET["id"]) } print ''; - print '
'.$langs->trans("Ref").''.$product->ref.'[Re-calculer]
'; - - - - - + print '
'; diff --git a/htdocs/product/stock/pre.inc.php b/htdocs/product/stock/pre.inc.php index 188543a1e0f..829f4992021 100644 --- a/htdocs/product/stock/pre.inc.php +++ b/htdocs/product/stock/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -19,8 +20,17 @@ * $Source$ * */ + +/*! + \file htdocs/stock/pre.inc.php + \ingroup stock + \brief Fichier gestionnaire du menu gauche de stocks + \version $Revision$ +*/ + require("../../main.inc.php"); require("./entrepot.class.php"); + function llxHeader($head = "", $urlp = "", $title="") { /* diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 1012977b5b5..760e22d8f67 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -21,8 +21,17 @@ * */ +/*! + \file htdocs/product/stock/product.php + \ingroup product + \brief Page de la fiche produit + \version $Revision$ +*/ + require("./pre.inc.php"); +$langs->load("products"); + $user->getrights('produit'); $mesg = ''; @@ -31,6 +40,11 @@ if (!$user->rights->produit->lire) accessforbidden(); } + +$types[0] = $langs->trans("Product"); +$types[1] = $langs->trans("Service"); + + llxHeader("","","Fiche produit"); if ($_POST["action"] == "create_stock") @@ -55,7 +69,7 @@ if ($_POST["action"] == "correct_stock" && $_POST["cancel"] <> "Annuler") } /* - * + * Fiche stock * */ if ($_GET["id"]) @@ -65,21 +79,39 @@ if ($_GET["id"]) if ( $product->fetch($_GET["id"])) { - $head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; - $head[0][1] = 'Fiche'; + + // Zone recherche + print '
'; + print '
'; + print ''; + print $langs->trans("Ref").':    '; + print $langs->trans("Label").':  '; + print '
'; + + + $h=0; + + $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Card"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; + $head[$h][1] = $langs->trans("Price"); + $h++; + + if($product->type == 0) + { + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = 'Stock'; + $hselected=$h; + $h++; + } + + $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Statistics"); + $h++; - $head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[1][1] = $langs->trans("Price"); - $h = 2; - - $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; - $head[$h][1] = 'Stock'; - $h++; - - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans("Statistics"); - - dolibarr_fiche_head($head, 2, 'Fiche '.$types[$product->type].' : '.$product->ref); + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print($mesg); @@ -98,7 +130,7 @@ if ($_GET["id"]) print "Cet article n'est pas en vente"; } print ''; - print "Libellé$product->libelle"; + print ''.$langs->trans("Label").''.$product->libelle.''; print ''.$langs->trans("Statistics").''; print 'Prix de vente'.price($product->price).''; print ''; @@ -113,13 +145,13 @@ if ($_GET["id"]) { $num = $db->num_rows(); $i = 0; - print ''; + print '
'; $var=True; while ($i < $num) { $objp = $db->fetch_object( $i); $var=!$var; - print ""; + print ""; print ''; $i++; } @@ -135,7 +167,7 @@ if ($_GET["id"]) * Contenu des stocks * */ - print '
'.$objp->nom.'
'; + print '
'; print ''; $sql = "SELECT e.rowid, e.label, ps.reel FROM ".MAIN_DB_PREFIX."entrepot as e, ".MAIN_DB_PREFIX."product_stock as ps"; $sql .= " WHERE ps.fk_entrepot = e.rowid AND ps.fk_product = $product->id"; @@ -154,22 +186,23 @@ if ($_GET["id"]) } } print '
EntrepôtValeur du stock
'.$langs->trans("Total").':'.$total."
"; + print '
'; } print ''; + /* * Correction du stock * - * */ if ($_GET["action"] == "correction") { print_titre ("Correction du stock"); print "
id\" method=\"post\">\n"; print ''; - print ''; + print '
'; print ''; print ''; - print ''; print '
EntrepôtNb de pièce
 '; + print '
 '; print '
'; print '
'; } + /* * Correction du stock * - * */ if ($_GET["action"] == "definir") { print_titre ("Créer un stock"); print "
id\" method=\"post\">\n"; print ''; - print ''; + print '
'; print ''; - print ''; + print ''; print '
EntrepôtNb de pièce
 '; - print '
 '; + print '
'; print '
'; }