Merge pull request #20781 from hregis/fix_missing_country_filter

FIX missing country filter in contract list
This commit is contained in:
Laurent Destailleur 2022-05-08 19:15:46 +02:00 committed by GitHub
commit 07e252e8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,6 +312,9 @@ if ($search_zip) {
if ($search_town) {
$sql .= natural_search(array('s.town'), $search_town);
}
if ($search_country && $search_country != '-1') {
$sql .= " AND s.fk_pays IN (".$db->sanitize($search_country).')';
}
if ($search_sale > 0) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale);
}
@ -489,6 +492,9 @@ if ($search_user > 0) {
if ($search_type_thirdparty > 0) {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
}
if ($search_country != '') {
$param .= "&search_country=".urlencode($search_country);
}
if ($search_product_category > 0) {
$param .= '&search_product_category='.urlencode($search_product_category);
}