diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 3ff496356a8..ce2ed5f11d8 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -55,11 +55,19 @@ $object = new Product($db); $error=0; + /* * Actions */ -if ($action == 'update_price' && ! $_POST ["cancel"] && ($user->rights->produit->creer || $user->rights->service->creer)) { +if ($action == 'update_price' && GETPOST("cancel")) +{ + + $action=''; +} + +if ($action == 'update_price' && ! GETPOST("cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) +{ $result = $object->fetch($id); $error=0; @@ -341,9 +349,9 @@ if ($isphoto) { print ''; // MultiPrix -if (! empty($conf->global->PRODUIT_MULTIPRICES)) +if (! empty($conf->global->PRODUIT_MULTIPRICES)) { - if (! empty($socid)) + if (! empty($socid)) { $soc = new Societe($db); $soc->id = $socid; @@ -366,7 +374,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) // Prix mini print '