wrong where cabyprodserv

This commit is contained in:
Quentin VIAL-GOUTEYRON 2021-06-02 10:53:04 +02:00
parent 89f6b66c2a
commit b8b30a9af6

View File

@ -263,11 +263,11 @@ if ($modecompta == 'CREANCES-DETTES')
}
}
$sql .= " AND (p.rowid IN ";
$sql .= " (SELECT fk_product FROM ".MAIN_DB_PREFIX."categorie_product cp WHERE ";
$sql .= " AND ";
if ($subcat) $sql .= "cp.fk_categorie IN (".$listofcatsql.")";
else $sql .= "cp.fk_categorie = ".$selected_cat;
$sql .= "))";
}
if ($selected_soc > 0) $sql .= " AND soc.rowid=".$selected_soc;
$sql .= " AND f.entity IN (".getEntity('invoice').")";