diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 36563565aec..dbc7c29784a 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -41,16 +41,16 @@ if ($_POST["action"] == 'add') $action = ''; } -if ($_POST["action"] == 'update' && $cancel <> 'Annuler') +if ($_POST["action"] == 'update' && $_POST["cancel"] <> 'Annuler') { $entrepot = new Entrepot($db); - if ($entrepot->fetch($id)) + if ($entrepot->fetch($_GET["id"])) { $entrepot->libelle = $_POST["libelle"]; $entrepot->description = $_POST["desc"]; $entrepot->statut = $_POST["statut"]; - if ( $entrepot->update($id, $user)) + if ( $entrepot->update($_GET["id"], $user)) { $action = ''; $mesg = 'Fiche mise à jour'; @@ -77,6 +77,11 @@ if ($cancel == 'Annuler') * Affichage * */ +/* + * Création + * + */ + if ($_GET["action"] == 'create') { print "