début ajout option : confirmation de suppression d'une ligne produit
This commit is contained in:
parent
1ae88e188d
commit
45517c0245
@ -87,6 +87,19 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_POST['action'] == 'confirm_deleteproductline' && $_POST['confirm'] == 'yes')
|
||||||
|
{
|
||||||
|
if ($user->rights->propale->creer)
|
||||||
|
{
|
||||||
|
$propal = new Propal($db);
|
||||||
|
$propal->fetch($_GET['propalid']);
|
||||||
|
$propal->delete_product($_GET['ligne']);
|
||||||
|
propale_pdf_create($db, $_GET['propalid'], $propal->modelpdf);
|
||||||
|
}
|
||||||
|
Header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ($_POST['action'] == 'confirm_validate' && $_POST['confirm'] == 'yes')
|
if ($_POST['action'] == 'confirm_validate' && $_POST['confirm'] == 'yes')
|
||||||
{
|
{
|
||||||
if ($user->rights->propale->valider)
|
if ($user->rights->propale->valider)
|
||||||
@ -421,7 +434,7 @@ if ($_POST['action'] == 'builddoc' && $user->rights->propale->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($_GET['action'] == 'del_ligne' && $user->rights->propale->creer)
|
if ($_GET['action'] == 'del_ligne' && $user->rights->propale->creer && !$conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Supprime une ligne produit dans la propale
|
* Supprime une ligne produit dans la propale
|
||||||
@ -534,6 +547,15 @@ if ($_GET['propalid'] > 0)
|
|||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete');
|
$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Confirmation de la suppression d'une ligne produit
|
||||||
|
*/
|
||||||
|
if ($_GET['action'] == 'delete_product_line' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||||
|
{
|
||||||
|
$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&ligne='.$objp->rowid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline');
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la validation de la propale
|
* Confirmation de la validation de la propale
|
||||||
@ -912,7 +934,14 @@ if ($_GET['propalid'] > 0)
|
|||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=editline&ligne='.$objp->rowid.'">';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=editline&ligne='.$objp->rowid.'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=del_ligne&ligne='.$objp->rowid.'">';
|
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||||
|
{
|
||||||
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=delete_product_ligne&ligne='.$objp->rowid.'">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=del_ligne&ligne='.$objp->rowid.'">';
|
||||||
|
}
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user