Merge pull request #18800 from hregis/fix_wrong_request_sql

FIX check if greater 0
This commit is contained in:
Laurent Destailleur 2021-09-24 13:10:24 +02:00 committed by GitHub
commit fd817ed015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,7 +189,7 @@ if ($fourn_id > 0) {
$sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id);
}
// Insert categ filter
if ($search_categ) {
if ($search_categ > 0) {
$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
}
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,";