From 9fef8b7dc2ac7f57ceb328bc014112a3416204c9 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 7 Dec 2022 10:11:57 +0100 Subject: [PATCH 1/3] FIX Search List Alias Name --- htdocs/comm/propal/list.php | 17 ++++++++++++----- htdocs/commande/list.php | 17 ++++++++++++----- htdocs/compta/facture/list.php | 17 ++++++++++++----- htdocs/fourn/commande/list.php | 25 +++++++++++++------------ htdocs/fourn/facture/list.php | 17 ++++++++++++----- htdocs/projet/list.php | 17 ++++++++++++----- htdocs/projet/tasks/list.php | 14 +++++++++----- htdocs/projet/tasks/time.php | 17 ++++++++++++----- htdocs/societe/list.php | 18 +++++++++++++----- htdocs/supplier_proposal/list.php | 17 ++++++++++++----- 10 files changed, 119 insertions(+), 57 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index cdb7a64a998..69ab7f773aa 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -548,6 +548,9 @@ $companystatic = new Societe($db); $projectstatic = new Project($db); $formcompany = new FormCompany($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $title = $langs->trans('ListOfProposals'); $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; llxHeader('', $title, $help_url); @@ -656,11 +659,15 @@ if ($search_project) { if ($search_availability) { $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_societe_alias) { - $sql .= natural_search('s.name_alias', $search_societe_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_login) { $sql .= natural_search(array("u.login", "u.firstname", "u.lastname"), $search_login); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b4c9fd6772f..82b47f1824b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -789,6 +789,9 @@ $company_url_list = array(); $formcompany = new FormCompany($db); $projectstatic = new Project($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $title = $langs->trans("Orders"); $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; @@ -935,11 +938,15 @@ if ($search_country) { if ($search_type_thirdparty && $search_type_thirdparty != '-1') { $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); +} else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } if ($search_parent_name) { $sql .= natural_search('s2.nom', $search_parent_name); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 987c29bae70..264563b1e99 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -558,6 +558,9 @@ $companystatic = new Societe($db); $companyparent = new Societe($db); $company_url_list = array(); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $sql = 'SELECT'; if ($sall || $search_user > 0) { $sql = 'SELECT DISTINCT'; @@ -670,11 +673,15 @@ if ($search_project_ref) { if ($search_project) { $sql .= natural_search('p.title', $search_project); } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); +} else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } if ($search_parent_name) { $sql .= natural_search('s2.nom', $search_parent_name); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 89df5cac1d2..008e0233dac 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -67,7 +67,7 @@ $search_date_order_endyear = GETPOST('search_date_order_endyear', 'int'); $search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear); -$search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int'); +$search_date_delivery_starvtday = GETPOST('search_date_delivery_startday', 'int'); $search_date_delivery_startmonth = GETPOST('search_date_delivery_startmonth', 'int'); $search_date_delivery_startyear = GETPOST('search_date_delivery_startyear', 'int'); $search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int'); @@ -751,6 +751,9 @@ if ($search_billed > 0) { //$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; $help_url = ''; +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $sql = 'SELECT'; if ($sall) { $sql = 'SELECT DISTINCT'; @@ -814,11 +817,15 @@ if ($search_refsupp) { if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); +} else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } if ($search_request_author) { $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_request_author); @@ -872,12 +879,6 @@ if ($search_country) { if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); -} if ($search_sale > 0) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index e69addd34fc..a2e14916071 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -404,6 +404,9 @@ $facturestatic = new FactureFournisseur($db); $formcompany = new FormCompany($db); $thirdparty = new Societe($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $sql = "SELECT"; if ($search_all) { $sql = 'SELECT DISTINCT'; @@ -506,11 +509,15 @@ if ($search_type != '' && $search_type >= 0) { if ($search_project) { $sql .= natural_search('p.ref', $search_project); } -if ($search_company) { - $sql .= natural_search('s.nom', $search_company); -} -if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); +} else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } if ($search_town) { $sql .= natural_search('s.town', $search_town); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b31666245d4..a16e77db6a3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -410,6 +410,9 @@ if (count($listofprojectcontacttypeexternal) == 0) { $listofprojectcontacttypeexternal[0] = '0'; // To avoid sql syntax error if not found } +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once. $sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat,"; $sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount,"; @@ -465,11 +468,15 @@ if ($search_ref) { if ($search_label) { $sql .= natural_search('p.title', $search_label); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_societe_alias) { - $sql .= natural_search('s.name_alias', $search_societe_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_opp_amount) { $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index f7ba2cc89f4..58b88fbe844 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -408,11 +408,15 @@ if ($search_task_progress) { if ($search_task_budget_amount) { $sql .= natural_search('t.budget_amount', $search_task_budget_amount, 1); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_societe_alias) { - $sql .= natural_search('s.name_alias', $search_societe_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_date_start) { $sql .= " AND t.dateo >= '".$db->idate($search_date_start)."'"; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index fce9813987c..a0845d47e25 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1510,6 +1510,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser */ $tasks = array(); + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields + $sql = "SELECT t.rowid, t.fk_task, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm,"; $sql .= " t.fk_product,"; $sql .= " pt.ref, pt.label, pt.fk_projet,"; @@ -1555,11 +1558,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref) { $sql .= natural_search('pt.ref', $search_task_ref); } - if ($search_company) { - $sql .= natural_search('s.nom', $search_company); - } - if ($search_company_alias) { - $sql .= natural_search('s.name_alias', $search_company_alias); + if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); + } else { + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } + if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); + } } if ($search_project_ref) { $sql .= natural_search('p.ref', $search_project_ref); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 6da7fcf3779..f3df948fe61 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -442,6 +442,9 @@ if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) { $title = $langs->trans("Suppliers"); } +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + // Select every potentiels, and note each potentiels which fit in search parameters $tab_level = array(); $sql = "SELECT code, label, sortorder"; @@ -598,11 +601,16 @@ if (strlen($search_cti)) { if ($search_id > 0) { $sql .= natural_search("s.rowid", $search_id, 1); } -if ($search_nom) { - $sql .= natural_search("s.nom", $search_nom); -} -if ($search_alias) { - $sql .= natural_search("s.name_alias", $search_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_nom){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_nom); +} else { + if ($search_nom) { + $sql .= natural_search("s.nom", $search_nom); + } + + if ($search_alias) { + $sql .= natural_search("s.name_alias", $search_alias); + } } if ($search_nom_only) { $sql .= natural_search("s.nom", $search_nom_only); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 3439c3ee11d..986debc8de3 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -288,6 +288,9 @@ $formpropal = new FormPropal($db); $companystatic = new Societe($db); $formcompany = new FormCompany($db); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $title = $langs->trans('ListOfSupplierProposals'); $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; @@ -362,11 +365,15 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { if ($search_ref) { $sql .= natural_search('sp.ref', $search_ref); } -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_societe_alias) { - $sql .= natural_search('s.name_alias', $search_societe_alias); +if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ + $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); +} else { + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); + } } if ($search_login) { $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login); From fbf7f8b8bc3dbfddcf9a793c2bbed670f0e5ed20 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Thu, 8 Dec 2022 08:47:33 +0100 Subject: [PATCH 2/3] FIX Propal List : alias name / Company display --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 69ab7f773aa..bde221dad24 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1784,7 +1784,7 @@ if ($resql) { // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { print ''; - print $companystatic->getNomUrl(1, 'customer'); + print $companystatic->getNomUrl(1, 'customer',0,0,1,empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); print ''; if (!$i) { $totalarray['nbfield']++; From 0db8a0b831f62b94ccbd00c8861b16763cf1da47 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 8 Dec 2022 09:34:48 +0000 Subject: [PATCH 3/3] Fixing style errors. --- htdocs/comm/propal/list.php | 4 ++-- htdocs/commande/list.php | 2 +- htdocs/compta/facture/list.php | 2 +- htdocs/fourn/commande/list.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/projet/list.php | 2 +- htdocs/projet/tasks/list.php | 2 +- htdocs/projet/tasks/time.php | 2 +- htdocs/societe/list.php | 2 +- htdocs/supplier_proposal/list.php | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index bde221dad24..ed86a61d7bd 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -659,7 +659,7 @@ if ($search_project) { if ($search_availability) { $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; } -if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); } else { if ($search_societe) { @@ -1784,7 +1784,7 @@ if ($resql) { // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { print ''; - print $companystatic->getNomUrl(1, 'customer',0,0,1,empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); + print $companystatic->getNomUrl(1, 'customer', 0, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); print ''; if (!$i) { $totalarray['nbfield']++; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 82b47f1824b..4257d1414b1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -938,7 +938,7 @@ if ($search_country) { if ($search_type_thirdparty && $search_type_thirdparty != '-1') { $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; } -if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); } else { if ($search_company) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 264563b1e99..1e290f0eb14 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -673,7 +673,7 @@ if ($search_project_ref) { if ($search_project) { $sql .= natural_search('p.title', $search_project); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); } else { if ($search_company) { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 008e0233dac..4a6c5795602 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -817,7 +817,7 @@ if ($search_refsupp) { if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); } else { if ($search_company) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index a2e14916071..be215e891eb 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -509,7 +509,7 @@ if ($search_type != '' && $search_type >= 0) { if ($search_project) { $sql .= natural_search('p.ref', $search_project); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); } else { if ($search_company) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a16e77db6a3..104c9a0b062 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -468,7 +468,7 @@ if ($search_ref) { if ($search_label) { $sql .= natural_search('p.title', $search_label); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); } else { if ($search_societe) { diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 58b88fbe844..72c5eb25874 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -408,7 +408,7 @@ if ($search_task_progress) { if ($search_task_budget_amount) { $sql .= natural_search('t.budget_amount', $search_task_budget_amount, 1); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); } else { if ($search_societe) { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index a0845d47e25..c06a4574928 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1558,7 +1558,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref) { $sql .= natural_search('pt.ref', $search_task_ref); } - if(empty($arrayfields['s.name_alias']['checked']) && $search_company){ + if (empty($arrayfields['s.name_alias']['checked']) && $search_company) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_company); } else { if ($search_company) { diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index f3df948fe61..0b12797acab 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -601,7 +601,7 @@ if (strlen($search_cti)) { if ($search_id > 0) { $sql .= natural_search("s.rowid", $search_id, 1); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_nom){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_nom) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_nom); } else { if ($search_nom) { diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 986debc8de3..add084e91ab 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -365,7 +365,7 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { if ($search_ref) { $sql .= natural_search('sp.ref', $search_ref); } -if(empty($arrayfields['s.name_alias']['checked']) && $search_societe){ +if (empty($arrayfields['s.name_alias']['checked']) && $search_societe) { $sql .= natural_search(array("s.nom", "s.name_alias"), $search_societe); } else { if ($search_societe) {