Fix: Minor fix into intervention card

This commit is contained in:
Laurent Destailleur 2014-09-18 00:21:25 +02:00
parent 3a11a46101
commit 47d423aae4
2 changed files with 9 additions and 3 deletions

View File

@ -82,7 +82,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->option_modereg = 0; // Affiche mode reglement $this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement $this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service $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 $this->option_draft_watermark = 1; //Support add of a watermark on drafts
// Get source company // Get source company

View File

@ -1840,12 +1840,18 @@ class Societe extends CommonObject
$nump = $this->db->num_rows($resql); $nump = $this->db->num_rows($resql);
if ($nump) if ($nump)
{ {
$sepa="("; $sepb=")";
if ($mode == 'email')
{
$sepa="<"; $sepb=">";
}
$i = 0; $i = 0;
while ($i < $nump) while ($i < $nump)
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
if ($mode == 'email') $property=$obj->email; if ($mode == 'email') $property=$obj->email;
else if ($mode == 'mobile') $property=$obj->phone_mobile; else if ($mode == 'mobile') $property=$obj->phone_mobile;
else $property=$obj->$mode;
// Show all contact. If hidedisabled is 1, showonly contacts with status = 1 // Show all contact. If hidedisabled is 1, showonly contacts with status = 1
if ($obj->statut == 1 || empty($hidedisabled)) if ($obj->statut == 1 || empty($hidedisabled))
@ -1858,11 +1864,11 @@ class Societe extends CommonObject
if (!empty($obj->poste)) if (!empty($obj->poste))
{ {
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))."(".$obj->poste.")"." &lt;".$property."&gt;"; $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname)).($obj->poste?" - ".$obj->poste:"").(($mode != 'poste' && $property)?" ".$sepa.$property.$sepb:'');
} }
else else
{ {
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." &lt;".$property."&gt;"; $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname)).(($mode != 'poste' && $property)?" ".$sepa.$property.$sepb:'');
} }
} }
$i++; $i++;