From fcb343e89133cc8224a528b95a00ce539fd5f87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 28 Oct 2020 20:53:29 +0100 Subject: [PATCH] Update societe.class.php --- htdocs/societe/class/societe.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 3047e986df8..3fcc7e610ac 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -789,8 +789,7 @@ class Societe extends CommonObject // Clean parameters if (empty($this->status)) $this->status = 0; $this->name = $this->name ?trim($this->name) : trim($this->nom); - if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = dol_ucwords(dol_strtolower($this->name)); - if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name = dol_strtoupper($this->name); + $this->setUpperOrLowerCase(); $this->nom = $this->name; // For backward compatibility if (empty($this->client)) $this->client = 0; if (empty($this->fournisseur)) $this->fournisseur = 0; @@ -1094,8 +1093,6 @@ class Societe extends CommonObject $now = dol_now(); - if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = dol_ucwords(dol_strtolower($this->name)); - if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name = dol_strtoupper($this->name); // Clean parameters $this->id = $id; $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); @@ -1106,6 +1103,7 @@ class Societe extends CommonObject $this->address = $this->address ?trim($this->address) : trim($this->address); $this->zip = $this->zip ?trim($this->zip) : trim($this->zip); $this->town = $this->town ?trim($this->town) : trim($this->town); + $this->setUpperOrLowerCase(); $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0) ? $this->country_id : 0; $this->phone = trim($this->phone);