mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
NEW hidden option MAIN_TE_PRIVATE_FIRST_AND_LASTNAME_TO_UPPER (#31143)
* NEW hidden option MAIN_TE_PRIVATE_FIRST_AND_LASTNAME_TO_UPPER Hidden option to force the formatting of third-party “natural person” names as follows: First Name LAST NAME * FIX Tabs must be used to indent lines; spaces are not allowed
This commit is contained in:
@@ -315,6 +315,19 @@ trait CommonPeople
|
||||
*/
|
||||
public function setUpperOrLowerCase()
|
||||
{
|
||||
if (getDolGlobalString('MAIN_TE_PRIVATE_FIRST_AND_LASTNAME_TO_UPPER')) {
|
||||
$this->lastname = dol_ucwords(dol_strtolower($this->lastname));
|
||||
$this->firstname = dol_ucwords(dol_strtolower($this->firstname));
|
||||
if (empty($this->typent_code) || $this->typent_code != "TE_PRIVATE") {
|
||||
$this->name = dol_ucwords(dol_strtolower($this->name));
|
||||
}
|
||||
if (!empty($this->firstname)) {
|
||||
$this->lastname = dol_strtoupper($this->lastname);
|
||||
}
|
||||
if (property_exists($this, 'name_alias')) {
|
||||
$this->name_alias = isset($this->name_alias) ? dol_ucwords(dol_strtolower($this->name_alias)) : '';
|
||||
}
|
||||
}
|
||||
if (getDolGlobalString('MAIN_FIRST_TO_UPPER')) {
|
||||
$this->lastname = dol_ucwords(dol_strtolower($this->lastname));
|
||||
$this->firstname = dol_ucwords(dol_strtolower($this->firstname));
|
||||
|
||||
Reference in New Issue
Block a user