From c2a46b4d81b74452300c191a6a0784553f065600 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 12 Jul 2003 10:32:37 +0000 Subject: [PATCH] =?UTF-8?q?Am=E9lioration=20de=20l'afficage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php3 | 41 +++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/htdocs/product/fiche.php3 b/htdocs/product/fiche.php3 index be79c731f7b..78785dbe283 100644 --- a/htdocs/product/fiche.php3 +++ b/htdocs/product/fiche.php3 @@ -58,15 +58,23 @@ if ($action == 'update' && $cancel <> 'Annuler') { $product = new Product($db); - $product->ref = $ref; - $product->libelle = $libelle; - $product->price = $price; + $product->ref = $HTTP_POST_VARS["ref"]; + $product->libelle = $HTTP_POST_VARS["libelle"]; + $product->price = $HTTP_POST_VARS["price"]; $product->tva_tx = $HTTP_POST_VARS["tva_tx"]; - $product->description = $desc; + $product->description = $HTTP_POST_VARS["desc"]; + $product->envente = $HTTP_POST_VARS["statut"]; - $product->update($id, $user); - $action = ''; - $mesg = 'Fiche mise à jour'; + if ( $product->update($id, $user)) + { + $action = ''; + $mesg = 'Fiche mise à jour'; + } + else + { + $action = 'edit'; + $mesg = 'Fiche non mise à jour !' . "
" . $product->mesg_error; + } } /* * @@ -87,7 +95,7 @@ if ($action == 'create') print 'Taux TVA'; $html = new Form($db); print $html->select_tva("tva_tx"); - print ''; + print ' %'; print "Description"; print '"; @@ -107,7 +115,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print '
Réf :  Réf :  
Libellé :   
'; @@ -137,7 +145,7 @@ else print "
Factures : ".$product->count_facture(); print ''; - print 'Taux TVA'.$product->tva_tx.''; + print 'Taux TVA'.$product->tva_tx.' %'; print "Description".nl2br($product->description).""; print ""; } @@ -157,6 +165,19 @@ else $html = new Form($db); print $html->select_tva("tva_tx", $product->tva_tx); print ''; + print 'Statut'; + print '