2
0
forked from Wavyzz/dolibarr

Fix : facture-rec 's deletion process

This commit is contained in:
hystepik
2023-01-04 16:09:55 +01:00
parent 566fb52fb8
commit 28ff94fd67

View File

@@ -271,7 +271,7 @@ if (empty($reshook)) {
}
// Delete
if ($action == 'confirm_deleteinvoice' && $confirm == 'yes' && $user->rights->facture->supprimer) {
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer) {
$object->delete($user);
header("Location: ".DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php');
@@ -1175,8 +1175,8 @@ if ($action == 'create') {
}
// Confirm delete of repeatable invoice
if ($action == 'ask_deleteinvoice') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_deleteinvoice', '', 'no', 1);
if ($action == 'delete') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_delete', '', 'no', 1);
}
// Call Hook formConfirm