From 9887d38589d1e62fc20c38e6fe7eb590b34bfcae Mon Sep 17 00:00:00 2001
From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com>
Date: Tue, 20 Mar 2018 11:13:02 +0100
Subject: [PATCH 1/2] Add dol_print_phone
Add dol_print_phone in thirdparty table list.
---
htdocs/societe/list.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index d046c325eca..452f3b089eb 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -1091,7 +1091,8 @@ while ($i < min($num, $limit))
}
if (! empty($arrayfields['s.phone']['checked']))
{
- print "
".$obj->phone." | \n";
+ $tmpcode=getCountry($obj->fk_pays,2);
+ print "".dol_print_phone($obj->phone, $tmpcode,0,$obj->rowid)." | \n";
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['s.url']['checked']))
From 4b0eede1dd0408a4fda71a42923cb0ff4988f4f9 Mon Sep 17 00:00:00 2001
From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com>
Date: Wed, 21 Mar 2018 08:53:38 +0100
Subject: [PATCH 2/2] Delete getCountry() and select field in sql query
Delete getCountry() and select field in sql query
---
htdocs/societe/list.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 452f3b089eb..d56e5b1e22a 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -399,6 +399,7 @@ $sql.= " s.email, s.phone, s.url, s.siren as idprof1, s.siret as idprof2, s.ape
$sql.= " s.tms as date_update, s.datec as date_creation,";
$sql.= " s.code_compta,s.code_compta_fournisseur,";
$sql.= " typent.code as typent_code,";
+$sql.= " country.code as country_code,";
$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)
@@ -1091,8 +1092,7 @@ while ($i < min($num, $limit))
}
if (! empty($arrayfields['s.phone']['checked']))
{
- $tmpcode=getCountry($obj->fk_pays,2);
- print "".dol_print_phone($obj->phone, $tmpcode,0,$obj->rowid)." | \n";
+ print "".dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid)." | \n";
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['s.url']['checked']))