NEW Constant to select if typent helps define whether the thirdparty is a company
This commit is contained in:
parent
70471186ed
commit
049beb9bf8
1 changed files with 9 additions and 5 deletions
|
|
@ -4082,12 +4082,16 @@ class Societe extends CommonObject
|
|||
$isacompany = 1;
|
||||
} elseif (!empty($this->idprof1) || !empty($this->idprof2) || !empty($this->idprof3) || !empty($this->idprof4) || !empty($this->idprof5) || !empty($this->idprof6)) {
|
||||
$isacompany = 1;
|
||||
} elseif (!empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') {
|
||||
// TODO Add a field is_a_company into dictionary
|
||||
if (preg_match('/^TE_PRIVATE/', $this->typent_code)) {
|
||||
$isacompany = 0;
|
||||
} else {
|
||||
if (!empty($conf->global->DEFINE_CUSTOMERS_ARE_COMPANIES_BY_TYPE_COMPANY)) {
|
||||
// TODO Add a field is_a_company into dictionary
|
||||
if (preg_match('/^TE_PRIVATE/', $this->typent_code)) {
|
||||
$isacompany = 0;
|
||||
} else {
|
||||
$isacompany = 1;
|
||||
}
|
||||
} else {
|
||||
$isacompany = 1;
|
||||
$isacompany = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue