Skip to content

Commit

Permalink
T966-develop : Put the poste of the contact in the list
Browse files Browse the repository at this point in the history
In the list of contact when we send a mail,i added the post of person in () after the name
htdocs/commande/fiche.php?id=481&action=presend&mode=init
  • Loading branch information
lrasamoelina committed Aug 7, 2013
1 parent 87713c4 commit c0d3ed0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions htdocs/societe/class/societe.class.php
Expand Up @@ -1576,7 +1576,7 @@ function contact_property_array($mode='email')
{
$contact_property = array();

$sql = "SELECT rowid, email, phone_mobile, lastname, firstname";
$sql = "SELECT rowid, email, phone_mobile, lastname, poste, firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
$sql.= " WHERE fk_soc = '".$this->id."'";

Expand All @@ -1592,7 +1592,13 @@ function contact_property_array($mode='email')
$obj = $this->db->fetch_object($resql);
if ($mode == 'email') $property=$obj->email;
else if ($mode == 'mobile') $property=$obj->phone_mobile;
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">";
if(!empty($obj->poste)){
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))."(".$obj->poste.")"." <".$property.">";
}
else
{
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">";
}
$i++;
}
}
Expand Down

0 comments on commit c0d3ed0

Please sign in to comment.