contact phone

This commit is contained in:
Frédéric FRANCE 2019-10-27 20:06:16 +01:00
parent dd5a9f4753
commit 043a71442f
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
3 changed files with 12 additions and 6 deletions

View File

@ -1162,11 +1162,11 @@ class Contact extends CommonObject
//if ($this->civility_id) $label.= '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate cibilty_id code
if (! empty($this->poste)) $label.= '<br><b>' . $langs->trans("Poste") . ':</b> '.$this->poste;
$label.= '<br><b>' . $langs->trans("EMail") . ':</b> '.$this->email;
$phonelist=array();
if ($this->phone_pro) $phonelist[]=$this->phone_pro;
if ($this->phone_mobile) $phonelist[]=$this->phone_mobile;
if ($this->phone_perso) $phonelist[]=$this->phone_perso;
$label.= '<br><b>' . $langs->trans("Phone") . ':</b> '.join(', ', $phonelist);
$phonelist = array();
if ($this->phone_pro) $phonelist[] = dol_print_phone($this->phone_pro, $this->country_code, $this->id, 0, '', '&nbsp;', 'phone');
if ($this->phone_mobile) $phonelist[] = dol_print_phone($this->phone_mobile, $this->country_code, $this->id, 0, '', '&nbsp;', 'mobile');
if ($this->phone_perso) $phonelist[] = dol_print_phone($this->phone_perso, $this->country_code, $this->id, 0, '', '&nbsp;', 'phone');
$label.= '<br><b>' . $langs->trans("Phone") . ':</b> '.implode('&nbsp;', $phonelist);
$label.= '<br><b>' . $langs->trans("Address") . ':</b> '.dol_format_address($this, 1, ' ', $langs);
$url = DOL_URL_ROOT.'/contact/card.php?id='.$this->id;

View File

@ -277,7 +277,7 @@ $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("
$sql = "SELECT s.rowid as socid, s.nom as name,";
$sql.= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email, p.skype,";
$sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,";
$sql.= " co.code as country_code";
$sql.= " co.label as country, co.code as country_code";
// Add fields from extrafields
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
@ -796,6 +796,8 @@ while ($i < min($num, $limit))
$contactstatic->phone_mobile=$obj->phone_mobile;
$contactstatic->zip=$obj->zip;
$contactstatic->town=$obj->town;
$contactstatic->country = $obj->country;
$contactstatic->country_code = $obj->country_code;
// ID
if (! empty($arrayfields['p.rowid']['checked']))

View File

@ -86,7 +86,9 @@ class box_contacts extends ModeleBoxes
$sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile, sp.email as spemail";
$sql.= ", s.nom as socname, s.name_alias, s.email as semail";
$sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
$sql.= ", co.label as country, co.code as country_code";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON sp.fk_pays = co.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE sp.entity IN (".getEntity('socpeople').")";
@ -121,6 +123,8 @@ class box_contacts extends ModeleBoxes
$contactstatic->address = $objp->address;
$contactstatic->zip = $objp->zip;
$contactstatic->town = $objp->town;
$contactstatic->country = $objp->country;
$contactstatic->country_code = $objp->country_code;
$societestatic->id = $objp->fk_soc;
$societestatic->name = $objp->socname;