remove PROPAL_REOPEN_TO_DRAFT

This commit is contained in:
Christophe Battarel 2021-08-03 10:58:40 +02:00
parent 8e9d02efb7
commit dfbefed0f6

View File

@ -256,6 +256,9 @@ if (empty($reshook)) {
// Validation
$idwarehouse = GETPOST('idwarehouse', 'int');
$result = $object->valid($user);
if ( $result > 0 && ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ) {
$result = $object->closeProposal($user, $object::STATUS_SIGNED);
}
if ($result >= 0) {
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
@ -680,7 +683,7 @@ if (empty($reshook)) {
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) {
$db->begin();
$result = $object->reopen($user, 1);
$result = $object->reopen($user, empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE));
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;