diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 874d5676e1f..727e98bc0dc 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -218,7 +218,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."product_lot as t"; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot_extrafields as ef on (t.rowid = ef.fk_object)"; $sql.= ", ".MAIN_DB_PREFIX."product as p"; $sql.= " WHERE p.rowid = t.fk_product"; -$sql.= " WHERE p.entity IN (".getEntity('product').")"; +$sql.= " AND p.entity IN (".getEntity('product').")"; if ($search_entity) $sql.= natural_search("entity",$search_entity); if ($search_product) $sql.= natural_search("p.ref",$search_product);