Merge pull request #17586 from atm-quentin/FIX_missing_town_and_zip_filter

FIX missing town and zip filter in contract list sql request
This commit is contained in:
Laurent Destailleur 2021-05-17 10:08:44 +02:00 committed by GitHub
commit 2637f9af63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,6 +256,8 @@ if ($search_email) $sql .= natural_search('s.email', $search_email);
if ($search_contract) $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract);
if (!empty($search_ref_customer)) $sql .= natural_search(array('c.ref_customer'), $search_ref_customer);
if (!empty($search_ref_supplier)) $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier);
if ($search_zip) $sql .= natural_search(array('s.zip'), $search_zip);
if ($search_town) $sql .= natural_search(array('s.town'), $search_town);
if ($search_sale > 0)
{
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;