Fix add missing filter on entity on stock listing for product combo
This commit is contained in:
parent
952e395943
commit
b6db04a727
@ -2082,7 +2082,7 @@ class Form
|
|||||||
if (count($warehouseStatusArray))
|
if (count($warehouseStatusArray))
|
||||||
{
|
{
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_product = p.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_product = p.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e on ps.fk_entrepot = e.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e on ps.fk_entrepot = e.rowid AND e.entity IN (".getEntity('stock').")";
|
||||||
$sql.= ' AND e.statut IN ('.$this->db->escape(implode(',',$warehouseStatusArray)).')'; // Return line if product is inside the selected stock. If not, an empty line will be returned so we will count 0.
|
$sql.= ' AND e.statut IN ('.$this->db->escape(implode(',',$warehouseStatusArray)).')'; // Return line if product is inside the selected stock. If not, an empty line will be returned so we will count 0.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user