Fix add option INVOICE_DISALLOW_REOPEN to lock problematic feature
This commit is contained in:
parent
28f0c6c7cf
commit
48c26fd614
@ -189,7 +189,7 @@ if (empty($reshook))
|
||||
$action = '';
|
||||
}
|
||||
} // Change status of invoice
|
||||
elseif ($action == 'reopen' && $usercancreate) {
|
||||
elseif ($action == 'reopen' && $usercancreate && empty($conf->global->INVOICE_DISALLOW_REOPEN)) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($object->statut == Facture::STATUS_CLOSED || ($object->statut == Facture::STATUS_ABANDONED && ($object->close_code != 'replaced' || $object->getIdReplacingInvoice() == 0)) || ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
|
||||
|
||||
Loading…
Reference in New Issue
Block a user