FIX : allow setDraft on cancelled orders if ORDER_REOPEN_TO_DRAFT is set (#30396)

* Fix missing loading trans file

* FIX : allow setDraft on cancelled orders if ORDER_REOPEN_TO_DRAFT is set

---------

Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
Co-authored-by: Christophe Battarel <christophe@altairis.fr>
This commit is contained in:
Christophe Battarel
2024-07-16 21:54:04 +02:00
committed by GitHub
parent 82589285e7
commit 97b4093d22
2 changed files with 2 additions and 1 deletions

View File

@@ -643,7 +643,7 @@ class Commande extends CommonOrder
$error = 0;
// Protection
if ($this->statut <= self::STATUS_DRAFT) {
if ($this->statut <= self::STATUS_DRAFT && !getDolGlobalInt('ORDER_REOPEN_TO_DRAFT')) {
return 0;
}