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:
parent
82589285e7
commit
97b4093d22
2 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2197,6 +2197,7 @@ if ($action == 'create') {
|
|||
);
|
||||
}
|
||||
if (isModEnabled('supplier_invoice') && $object->status > 0 && $soc->fournisseur == 1) {
|
||||
$langs->load("suppliers");
|
||||
$arrayofcreatebutton[] = array(
|
||||
'url' => '/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id,
|
||||
'label' => $langs->trans('AddSupplierInvoice'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue