diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 9cff8d9a412..c51b5b29196 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -742,11 +742,11 @@ class Commande extends CommonOrder if ($usercanclose) { - $this->db->begin(); if ($this->statut == self::STATUS_CLOSED) { return 0; } + $this->db->begin(); $now = dol_now();