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

Merge pull request #3668 from altatof/fix_stock_entity

fix entities warehouse share
parents a3032d56 f3ef9b86
No related branches found
No related tags found
No related merge requests found
...@@ -2662,7 +2662,7 @@ class Product extends CommonObject ...@@ -2662,7 +2662,7 @@ class Product extends CommonObject
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp"; $sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp";
$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