FIX error managent and db transaction balance

This commit is contained in:
Laurent Destailleur
2021-01-14 19:15:54 +01:00
parent 0d704b0714
commit bcfe03216a

View File

@@ -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;