Merge pull request #1203 from PaulPoulain/966-develop

T966-develop : Put the poste of the contact in the list
This commit is contained in:
Laurent Destailleur 2013-09-01 14:49:06 -07:00
commit 1392f4e623
3 changed files with 28 additions and 23 deletions

View File

@ -1581,8 +1581,7 @@ class Societe extends CommonObject
$contact_property = array(); $contact_property = array();
$sql = "SELECT rowid, email, phone_mobile, lastname, poste, firstname";
$sql = "SELECT rowid, email, statut, phone_mobile, lastname, firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
$sql.= " WHERE fk_soc = '".$this->id."'"; $sql.= " WHERE fk_soc = '".$this->id."'";
@ -1604,6 +1603,12 @@ class Societe extends CommonObject
{ {
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">"; $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++; $i++;
} }