Fix: Bug #460 - Wrong entity assignment when creating a warehouse

This commit is contained in:
Regis Houssin 2012-07-26 20:52:05 +02:00
parent 79181f9183
commit 20ed6bd5c5

View File

@ -2413,7 +2413,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 = (".getEntity('warehouse', 1).")";
$sql.= " WHERE w.entity IN (".getEntity('warehouse', 1).")";
$sql.= " AND w.rowid = ps.fk_entrepot";
$sql.= " AND ps.fk_product = ".$this->id;