Merge pull request #23414 from Hystepik/develop#1

Fix : facture-rec 's deletion process
This commit is contained in:
Laurent Destailleur 2023-01-04 17:37:56 +01:00 committed by GitHub
commit 700e0139cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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