From 295ab40cfb45706f84ea0b450c90f7fec3e5a106 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 13 Jul 2004 14:26:13 +0000 Subject: [PATCH] Modif style --- htdocs/product/stock/product.php | 51 ++++++++++++-------------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7cddc4a547e..3588defffcc 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -32,21 +32,21 @@ if (!$user->rights->produit->lire) llxHeader("","","Fiche produit"); -if ($HTTP_POST_VARS["action"] == "create_stock") +if ($_POST["action"] == "create_stock") { $product = new Product($db); $product->id = $_GET["id"]; - $product->create_stock($HTTP_POST_VARS["id_entrepot"], $HTTP_POST_VARS["nbpiece"]); + $product->create_stock($_POST["id_entrepot"], $_POST["nbpiece"]); } -if ($HTTP_POST_VARS["action"] == "correct_stock") +if ($_POST["action"] == "correct_stock") { $product = new Product($db); $product->id = $_GET["id"]; $product->correct_stock($user, - $HTTP_POST_VARS["id_entrepot"], - $HTTP_POST_VARS["nbpiece"], - $HTTP_POST_VARS["mouvement"]); + $_POST["id_entrepot"], + $_POST["nbpiece"], + $_POST["mouvement"]); } @@ -58,12 +58,12 @@ if ($cancel == 'Annuler') * * */ -if ($id) +if ($_GET["id"]) { if ($action <> 're-edit') { $product = new Product($db); - $result = $product->fetch($id); + $result = $product->fetch($_GET["id"]); } if ( $result ) @@ -87,14 +87,14 @@ if ($id) } print ''; print "Libellé$product->libelle"; - print 'Statistiques'; + print 'Statistiques'; print 'Prix de vente'.price($product->price).''; print ''; - 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) ) @@ -156,7 +156,7 @@ if ($id) if ($_GET["action"] == "correction") { print_titre ("Correction du stock"); - print "
\n"; + print "id\" method=\"post\">\n"; print ''; print ''; print '
Entrepôt'; print ''; print '
Entrepôt'; +print "
\n"; -print '
'; - -print ''; - -if ($action == '') +if ($_GET["action"] == '') { if ($user->rights->produit->modifier || $user->rights->produit->creer) { - print ''; + print 'Editer'; } - else - { - print ''; - } -} -else -{ - print ''; -} -print ''; -print ''; -print '
--Editer---Correction stock

'; +} +print 'Correction stock'; +print ''; $db->close();