diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index fae2fefefaa..88ce1a6df9c 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();