Skip to content
Snippets Groups Projects
Commit c6081f0f authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

Fix multientity stock management (F.Henry followup)

parent 70df5538
Branches
Tags
No related merge requests found
...@@ -2994,7 +2994,7 @@ class Product extends CommonObject ...@@ -2994,7 +2994,7 @@ class Product extends CommonObject
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp, ps.rowid"; $sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp, ps.rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; $sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
$sql.= ", ".MAIN_DB_PREFIX."entrepot as w"; $sql.= ", ".MAIN_DB_PREFIX."entrepot as w";
$sql.= " WHERE w.entity IN (".getEntity('warehouse', 1).")"; $sql.= " WHERE w.entity IN (".getEntity('stock', 1).")";
$sql.= " AND w.rowid = ps.fk_entrepot"; $sql.= " AND w.rowid = ps.fk_entrepot";
$sql.= " AND ps.fk_product = ".$this->id; $sql.= " AND ps.fk_product = ".$this->id;
......
...@@ -358,7 +358,7 @@ class Entrepot extends CommonObject ...@@ -358,7 +358,7 @@ class Entrepot extends CommonObject
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot";
$sql.= " WHERE entity IN (".getEntity('warehouse', 1).")"; $sql.= " WHERE entity IN (".getEntity('stock', 1).")";
$sql.= " AND statut = ".$status; $sql.= " AND statut = ".$status;
$result = $this->db->query($sql); $result = $this->db->query($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment