From 5e690ddd414ab60ea7fa33d577cde475f5f91623 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 May 2019 15:41:22 +0200 Subject: [PATCH] Fix avoid subquery into query --- htdocs/societe/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 68d61e627e1..117a3d30eed 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -374,7 +374,7 @@ $sql.= " s.code_compta, s.code_compta_fournisseur, s.parent as fk_parent,"; $sql.= " s2.nom as name2,"; $sql.= " typent.code as typent_code,"; $sql.= " staff.code as staff_code,"; -$sql.= " country.code as country_code,"; +$sql.= " country.code as country_code, country.label as country_label,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= " region.code_region as region_code, region.nom as region_name"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) @@ -1094,8 +1094,8 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['country.code_iso']['checked'])) { print ''; - $tmparray=getCountry($obj->fk_pays, 'all'); - print $tmparray['label']; + $labelcountry=($obj->code && ($langs->trans("Country".$obj->code)!="Country".$obj->code))?$langs->trans("Country".$obj->code):$obj->country_label; + print $labelcountry; print ''; if (! $i) $totalarray['nbfield']++; }