Minor - improve coherence of delete messages in products/services (same as companies)
This commit is contained in:
parent
433be914bf
commit
8246e1de5c
@ -236,23 +236,21 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer)
|
|||||||
/*
|
/*
|
||||||
* Suppression d'un produit/service pas encore affect
|
* Suppression d'un produit/service pas encore affect
|
||||||
*/
|
*/
|
||||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->produit->supprimer)
|
if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->produit->supprimer)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$product->fetch($_GET["id"]);
|
$product->fetch($_GET['id']);
|
||||||
$result = $product->delete($_GET["id"]);
|
$result = $product->delete($_GET['id']);
|
||||||
|
|
||||||
if ($result == 0)
|
if ($result == 0)
|
||||||
{
|
{
|
||||||
llxHeader();
|
Header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.$product->ref);
|
||||||
print '<div class="ok">'.$langs->trans("ProductDeleted",$product->ref).'</div>';
|
exit;
|
||||||
llxFooter();
|
|
||||||
exit ;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$reload = 0;
|
$reload = 0;
|
||||||
$_GET["action"]='';
|
$_GET['action']='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -171,6 +171,12 @@ if ($resql)
|
|||||||
|
|
||||||
llxHeader("","",$texte);
|
llxHeader("","",$texte);
|
||||||
|
|
||||||
|
// Displays product removal confirmation
|
||||||
|
if (!empty($_GET['delprod']))
|
||||||
|
{
|
||||||
|
print '<div class="warning">'.$langs->trans("ProductDeleted",$_GET['delprod']).'</div><br />';
|
||||||
|
}
|
||||||
|
|
||||||
$param="&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"];
|
$param="&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"];
|
||||||
$param.="&fourn_id=".$fourn_id;
|
$param.="&fourn_id=".$fourn_id;
|
||||||
$param.=isset($type)?"&type=".$type:"";
|
$param.=isset($type)?"&type=".$type:"";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user