Modfi process de validation des infos

This commit is contained in:
Rodolphe Quiedeville 2003-09-13 14:20:14 +00:00
parent fe40e653f1
commit 559f33ba55

View File

@ -71,7 +71,8 @@ if ($action == 'addinpropal')
$action = ''; $action = '';
} }
if ($action == 'addinfacture') if ($HTTP_POST_VARS["action"] == 'addinfacture' &&
( $user->rights->facture->modifier || $user->rights->facture->creer))
{ {
$product = new Product($db); $product = new Product($db);
$result = $product->fetch($id); $result = $product->fetch($id);
@ -95,6 +96,10 @@ if ($HTTP_POST_VARS["action"] == 'update' &&
( $user->rights->produit->modifier || $user->rights->produit->creer)) ( $user->rights->produit->modifier || $user->rights->produit->creer))
{ {
$product = new Product($db); $product = new Product($db);
if ($product->fetch($id))
{
if ($product->check())
{
$product->ref = $HTTP_POST_VARS["ref"]; $product->ref = $HTTP_POST_VARS["ref"];
$product->libelle = $HTTP_POST_VARS["libelle"]; $product->libelle = $HTTP_POST_VARS["libelle"];
@ -115,6 +120,13 @@ if ($HTTP_POST_VARS["action"] == 'update' &&
$action = 'edit'; $action = 'edit';
$mesg = 'Fiche non mise à jour !' . "<br>" . $product->mesg_error; $mesg = 'Fiche non mise à jour !' . "<br>" . $product->mesg_error;
} }
}
else
{
$action = 'edit';
$mesg = 'Fiche non mise à jour !' . "<br>" . $product->mesg_error;
}
}
} }
if ($HTTP_POST_VARS["action"] == 'update_price' && if ($HTTP_POST_VARS["action"] == 'update_price' &&