FIX use existing PROPAL_SKIP_ACCEPT_REFUSE instead

This commit is contained in:
Regis Houssin 2022-10-31 14:58:38 +01:00
parent 88152eccda
commit b7293632cf

View File

@ -462,7 +462,7 @@ if ($action == "nosign" && $permissiontoclose) {
$error = 0;
foreach ($toselect as $checked) {
if ($tmpproposal->fetch($checked) > 0) {
if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED || !empty($conf->global->PROPAL_BYPASS_VALIDATED_STATUS)) {
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');