Skip to content

Commit

Permalink
FIX : allow setDraft on cancelled orders if ORDER_REOPEN_TO_DRAFT is …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Co-authored-by: Christophe Battarel <[email protected]>
  • Loading branch information
3 people authored Jul 16, 2024
1 parent 8258928 commit 97b4093
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/commande/class/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ public function setDraft($user, $idwarehouse = -1)
$error = 0;

// Protection
if ($this->statut <= self::STATUS_DRAFT) {
if ($this->statut <= self::STATUS_DRAFT && !getDolGlobalInt('ORDER_REOPEN_TO_DRAFT')) {
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions htdocs/contrat/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,7 @@
);
}
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'),
Expand Down

0 comments on commit 97b4093

Please sign in to comment.