remove PROPAL_REOPEN_TO_DRAFT
This commit is contained in:
parent
8e9d02efb7
commit
dfbefed0f6
@ -256,6 +256,9 @@ if (empty($reshook)) {
|
|||||||
// Validation
|
// Validation
|
||||||
$idwarehouse = GETPOST('idwarehouse', 'int');
|
$idwarehouse = GETPOST('idwarehouse', 'int');
|
||||||
$result = $object->valid($user);
|
$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 ($result >= 0) {
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
$outputlangs = $langs;
|
$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) {
|
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$result = $object->reopen($user, 1);
|
$result = $object->reopen($user, empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE));
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user