Skip to content
Snippets Groups Projects
Commit 9b48cd78 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Error in stock correction

parent 0643ffa1
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,8 @@ class MouvementStock ...@@ -79,7 +79,8 @@ class MouvementStock
$sql.= " '".price2num($price)."')"; $sql.= " '".price2num($price)."')";
dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG); dol_syslog("MouvementStock::_create sql=".$sql, LOG_DEBUG);
if ($resql = $this->db->query($sql)) $resql = $this->db->query($sql);
if ($resql)
{ {
$mvid = $this->db->last_insert_id(MAIN_DB_PREFIX."stock_mouvement"); $mvid = $this->db->last_insert_id(MAIN_DB_PREFIX."stock_mouvement");
} }
...@@ -104,7 +105,8 @@ class MouvementStock ...@@ -104,7 +105,8 @@ class MouvementStock
$sql.= " WHERE fk_entrepot = ".$entrepot_id." AND fk_product = ".$fk_product; $sql.= " WHERE fk_entrepot = ".$entrepot_id." AND fk_product = ".$fk_product;
dol_syslog("MouvementStock::_create sql=".$sql); dol_syslog("MouvementStock::_create sql=".$sql);
if ($this->db->query($sql)) $resql=$this->db->query($sql);
if ($resql)
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
if ($obj) if ($obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment