Fix: retour sur la fiche catégorie après sa création
This commit is contained in:
parent
964d282b4a
commit
00098feb58
@ -94,11 +94,11 @@ if ($_POST["action"] == 'add' && $user->rights->categorie->creer)
|
|||||||
|
|
||||||
if ($categorie->error =="")
|
if ($categorie->error =="")
|
||||||
{
|
{
|
||||||
if ($categorie->create() > 0)
|
$result = $categorie->create();
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$_GET["action"] = 'confirmed';
|
$_GET["action"] = 'confirmed';
|
||||||
$_POST["addcat"] = '';
|
$_POST["addcat"] = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,11 +113,16 @@ if ($_POST["action"] == 'add' && $user->rights->categorie->creer)
|
|||||||
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?id='.$idProdOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?id='.$idProdOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if ($idSupplierOrigin || $idCompanyOrigin)
|
else if ($idSupplierOrigin || $idCompanyOrigin)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?socid='.$idCompanyOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?socid='.$idCompanyOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$result.'&type='.$_POST["type"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user