fix entities warehouse share

This commit is contained in:
Christophe Battarel 2015-10-05 16:19:54 +02:00
parent 27b47a4f48
commit f3ef9b868f
2 changed files with 2 additions and 2 deletions

View File

@ -2662,7 +2662,7 @@ class Product extends CommonObject
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
$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 ps.fk_product = ".$this->id;

View File

@ -358,7 +358,7 @@ class Entrepot extends CommonObject
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot";
$sql.= " WHERE entity IN (".getEntity('warehouse', 1).")";
$sql.= " WHERE entity IN (".getEntity('stock', 1).")";
$sql.= " AND statut = ".$status;
$result = $this->db->query($sql);