Fix: Error in stock correction

This commit is contained in:
Laurent Destailleur 2010-08-01 17:25:42 +00:00
parent 0643ffa1ac
commit 9b48cd789b

View File

@ -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
$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)