commit
d6912e89be
@ -131,11 +131,18 @@ class Contact extends CommonObject
|
|||||||
public $civility;
|
public $civility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Address
|
* @var string Address
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $address;
|
public $address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string zip code
|
||||||
|
*/
|
||||||
public $zip;
|
public $zip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Town
|
||||||
|
*/
|
||||||
public $town;
|
public $town;
|
||||||
|
|
||||||
public $state_id; // Id of department
|
public $state_id; // Id of department
|
||||||
@ -201,10 +208,29 @@ class Contact extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $jabberid;
|
public $jabberid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string filename for photo
|
||||||
|
*/
|
||||||
public $photo;
|
public $photo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string phone pro
|
||||||
|
*/
|
||||||
public $phone_pro;
|
public $phone_pro;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string phone perso
|
||||||
|
*/
|
||||||
public $phone_perso;
|
public $phone_perso;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string phone mobile
|
||||||
|
*/
|
||||||
public $phone_mobile;
|
public $phone_mobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string fax
|
||||||
|
*/
|
||||||
public $fax;
|
public $fax;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -253,9 +279,12 @@ class Contact extends CommonObject
|
|||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->statut = 1; // By default, status is enabled
|
$this->statut = 1; // By default, status is enabled
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0;
|
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
|
||||||
if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0;
|
$this->fields['rowid']['visible'] = 0;
|
||||||
|
}
|
||||||
|
if (empty($conf->mailing->enabled)) {
|
||||||
|
$this->fields['no_email']['enabled'] = 0;
|
||||||
|
}
|
||||||
// typical ['s.nom'] is used for third-parties
|
// typical ['s.nom'] is used for third-parties
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
|
||||||
$this->fields['fk_soc']['enabled'] = 0;
|
$this->fields['fk_soc']['enabled'] = 0;
|
||||||
@ -268,10 +297,8 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unset fields that are disabled
|
// Unset fields that are disabled
|
||||||
foreach ($this->fields as $key => $val)
|
foreach ($this->fields as $key => $val) {
|
||||||
{
|
if (isset($val['enabled']) && empty($val['enabled'])) {
|
||||||
if (isset($val['enabled']) && empty($val['enabled']))
|
|
||||||
{
|
|
||||||
unset($this->fields[$key]);
|
unset($this->fields[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1474,6 +1501,7 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
// Initialise parameters
|
// Initialise parameters
|
||||||
$this->id = 0;
|
$this->id = 0;
|
||||||
|
$this->entity = 1;
|
||||||
$this->specimen = 1;
|
$this->specimen = 1;
|
||||||
$this->lastname = 'DOLIBARR';
|
$this->lastname = 'DOLIBARR';
|
||||||
$this->firstname = 'SPECIMEN';
|
$this->firstname = 'SPECIMEN';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user