From 0882c7f5af80e9325bef2588ebb087514844d920 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 5 May 2022 08:43:22 +0200 Subject: [PATCH] FIX missing country filter in contract list --- htdocs/contrat/list.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index cbcfa2b6efe..ac8bb8811a8 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -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); }