Fix: Suppression utilisation de dbclone inutile
This commit is contained in:
parent
6e07dc253d
commit
04d6bd1e7a
@ -315,6 +315,7 @@ class FactureRec extends Facture
|
|||||||
|
|
||||||
$notify = New Notify($this->db);
|
$notify = New Notify($this->db);
|
||||||
$notify->send($action_notify, $this->socidp, $mesg, "facture", $rowid, $filepdf);
|
$notify->send($action_notify, $this->socidp, $mesg, "facture", $rowid, $filepdf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update Stats
|
* Update Stats
|
||||||
*
|
*
|
||||||
@ -323,24 +324,25 @@ class FactureRec extends Facture
|
|||||||
$sql .= " AND fk_product IS NOT NULL";
|
$sql .= " AND fk_product IS NOT NULL";
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows();
|
$num = $this->db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."product SET nbvente=nbvente+1 WHERE rowid = ".$obj->fk_product;
|
$sql = "UPDATE ".MAIN_DB_PREFIX."product";
|
||||||
$db2 = $this->db->dbclone();
|
$sql.= " SET nbvente=nbvente+1";
|
||||||
$result = $db2->query($sql);
|
$sql.= " WHERE rowid = ".$obj->fk_product;
|
||||||
|
$result2 = $db->query($sql);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Contrats
|
* Contrats
|
||||||
*/
|
*/
|
||||||
$contrat = new Contrat($this->db);
|
$contrat = new Contrat($this->db);
|
||||||
$contrat->create_from_facture($this->id, $user, $this->socidp);
|
$contrat->create_from_facture($this->id, $user, $this->socidp);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user