Merge pull request #3506 from atm-maxime/3.6

Fix multientity stock management (F.Henry followup)
This commit is contained in:
Laurent Destailleur
2015-09-12 10:58:26 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -2994,7 +2994,7 @@ class Product extends CommonObject
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp, ps.rowid";
$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);