From bcfe03216ae7b988949b62b6c83e9e1ccee66864 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jan 2021 19:15:54 +0100 Subject: [PATCH] FIX error managent and db transaction balance --- htdocs/commande/class/commande.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 908a7d3b175..7ed6d5e7199 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2903,13 +2903,12 @@ class Commande extends CommonOrder { $error = 0; - $this->db->begin(); - if ($this->billed) { return 0; } + $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;