From d63e7c6b6e460762125e7b0f79588f68a4c2a0df Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 18 Nov 2003 09:32:24 +0000 Subject: [PATCH] =?UTF-8?q?Ajoute=20le=20statut=20lors=20de=20la=20cr=E9at?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php | 53 +++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 84c534ee49d..7d8e6b7ae2e 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -45,6 +45,7 @@ if ($action == 'add') $product->price = $HTTP_POST_VARS["price"]; $product->tva_tx = $HTTP_POST_VARS["tva_tx"]; $product->type = $HTTP_POST_VARS["type"]; + $product->envente = $HTTP_POST_VARS["statut"]; $product->description = $HTTP_POST_VARS["desc"]; $product->duration_value = $HTTP_POST_VARS["duration_value"]; $product->duration_unit = $HTTP_POST_VARS["duration_unit"]; @@ -59,7 +60,7 @@ if ($action == 'addinpropal') $propal = New Propal($db); $propal->fetch($HTTP_POST_VARS["propalid"]); - $result = $propal->insert_product($id, $HTTP_POST_VARS["qty"]); + $result = $propal->insert_product($id, $HTTP_POST_VARS["qty"], $HTTP_POST_VARS["remise_percent"]); if ( $result < 0) { $mesg = "erreur $result"; @@ -195,7 +196,13 @@ if ($action == 'create') $html = new Form($db); print $html->select_tva("tva_tx"); print ''; - if ($_GET["type"] == 0) + print 'Statut'; + print ''; @@ -292,23 +299,26 @@ else print ''; print 'Taux TVA'.$product->tva_tx.' %'; - print 'Stock'; - if ($product->no_stock) + if ($product->type == 0 && defined("MAIN_MODULE_STOCK")) { - print "Pas de définition de stock pour ce produit"; - } - else - { - if ($product->stock_reel <= $product->seuil_stock_alerte) + print 'Stock'; + if ($product->no_stock) { - print ''.$product->stock_reel.' Seuil : '.$product->seuil_stock_alerte; + print "Pas de définition de stock pour ce produit"; } else { + if ($product->stock_reel <= $product->seuil_stock_alerte) + { + print ''.$product->stock_reel.' Seuil : '.$product->seuil_stock_alerte; + } + else + { print "".$product->stock_reel; + } } + print ''; } - print ''; print "Description".nl2br($product->description).""; if ($product->type == 1) @@ -414,7 +424,7 @@ else print ''; } print ''; - if ($product->type == 0) + if ($product->type == 0 && defined("MAIN_MODULE_STOCK")) { print "".'Seuil stock'; print ''; @@ -520,8 +530,14 @@ else print '-'; } print '-'; - -print 'Correction stock'; +if ($product->type == 0 && defined("MAIN_MODULE_STOCK")) +{ + print 'Correction stock'; +} +else +{ + print '-'; +} print '
'; @@ -564,7 +580,8 @@ if ($id && $action == '' && $product->envente) print '
'; print ''; print ''; - print ''; + print ' Rem.'; + print ' %'; print " ".$product->stock_proposition; print ''; print ''; @@ -591,7 +608,8 @@ if ($id && $action == '' && $product->envente) print "".'Autres Propositions'; $htmls->select_array("propalid", $otherprop); print ''; - print ''; + print ' Rem.'; + print ' %'; print ''; print ''; print ''; @@ -633,7 +651,8 @@ if ($id && $action == '' && $product->envente) print ''; print ''; print ''; - print ''; + print ' Rem.'; + print ' %'; print ''; print ''; print "";