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 '