FIX error managent and db transaction balance
This commit is contained in:
parent
0d704b0714
commit
bcfe03216a
@ -2903,13 +2903,12 @@ class Commande extends CommonOrder
|
|||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
if ($this->billed)
|
if ($this->billed)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1';
|
||||||
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
|
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user