From 47d423aae490072b4e85dcb3eee78ca3b33cfbe2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Sep 2014 00:21:25 +0200 Subject: [PATCH] Fix: Minor fix into intervention card --- .../core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/societe/class/societe.class.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 4a1915b0a34..be1d81ed1d2 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -82,7 +82,7 @@ class pdf_soleil extends ModelePDFFicheinter $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_draft_watermark = 1; //Support add of a watermark on drafts // Get source company diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 72558da58bb..cfd37436b72 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1840,12 +1840,18 @@ class Societe extends CommonObject $nump = $this->db->num_rows($resql); if ($nump) { + $sepa="("; $sepb=")"; + if ($mode == 'email') + { + $sepa="<"; $sepb=">"; + } $i = 0; while ($i < $nump) { $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; else if ($mode == 'mobile') $property=$obj->phone_mobile; + else $property=$obj->$mode; // Show all contact. If hidedisabled is 1, showonly contacts with status = 1 if ($obj->statut == 1 || empty($hidedisabled)) @@ -1858,11 +1864,11 @@ class Societe extends CommonObject if (!empty($obj->poste)) { - $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))."(".$obj->poste.")"." <".$property.">"; + $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname)).($obj->poste?" - ".$obj->poste:"").(($mode != 'poste' && $property)?" ".$sepa.$property.$sepb:''); } else { - $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">"; + $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname)).(($mode != 'poste' && $property)?" ".$sepa.$property.$sepb:''); } } $i++;