Merge pull request #22716 from hregis/new_add_constant_to_bypass_valideted_status

FIX use existing PROPAL_SKIP_ACCEPT_REFUSE for massaction
This commit is contained in:
Laurent Destailleur 2022-11-01 20:00:42 +01:00 committed by GitHub
commit c07ce8ae95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,7 +466,7 @@ if ($action == "nosign" && $permissiontoclose) {
$error = 0;
foreach ($toselect as $checked) {
if ($tmpproposal->fetch($checked) > 0) {
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) {
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED || (!empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $tmpproposal->statut == $tmpproposal::STATUS_DRAFT)) {
$tmpproposal->statut = $tmpproposal::STATUS_NOTSIGNED;
if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_NOTSIGNED) > 0) {
setEventMessage($tmpproposal->ref." ".$langs->trans('NoSigned'), 'mesgs');