Mise en forme du numéro de téléphone et du fax

This commit is contained in:
Rodolphe Quiedeville 2004-05-25 09:52:44 +00:00
parent c8b6729c3e
commit 0dbac489b2

View File

@ -88,6 +88,12 @@ class Societe {
$this->capital = 0; $this->capital = 0;
} }
$this->tel = ereg_replace(" ","",$this->tel);
$this->tel = ereg_replace("\.","",$this->tel);
$this->fax = ereg_replace(" ","",$this->fax);
$this->fax = ereg_replace("\.","",$this->fax);
$sql = "UPDATE ".MAIN_DB_PREFIX."societe "; $sql = "UPDATE ".MAIN_DB_PREFIX."societe ";
$sql .= " SET nom = '" . trim($this->nom) ."'"; $sql .= " SET nom = '" . trim($this->nom) ."'";
$sql .= ",address = '" . trim($this->adresse) ."'"; $sql .= ",address = '" . trim($this->adresse) ."'";
@ -95,8 +101,8 @@ class Societe {
$sql .= ",ville = '" . trim($this->ville) ."'"; $sql .= ",ville = '" . trim($this->ville) ."'";
$sql .= ",fk_departement = '" . $this->departement_id ."'"; $sql .= ",fk_departement = '" . $this->departement_id ."'";
$sql .= ",fk_pays = '" . $this->pays_id ."'"; $sql .= ",fk_pays = '" . $this->pays_id ."'";
$sql .= ",tel = '" . ereg_replace(" ","",$this->tel) ."'"; $sql .= ",tel = '" . $this->tel ."'";
$sql .= ",fax = '" . ereg_replace(" ","",$this->fax) ."'"; $sql .= ",fax = '" . $this->fax ."'";
$sql .= ",url = '" . trim($this->url) ."'"; $sql .= ",url = '" . trim($this->url) ."'";
$sql .= ",siren = '" . trim($this->siren) ."'"; $sql .= ",siren = '" . trim($this->siren) ."'";
$sql .= ",siret = '" . trim($this->siret) ."'"; $sql .= ",siret = '" . trim($this->siret) ."'";
@ -209,7 +215,6 @@ class Societe {
$this->nom_url = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">'.$obj->nom.'</a>'; $this->nom_url = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">'.$obj->nom.'</a>';
} }
$this->rubrique = $obj->rubrique; $this->rubrique = $obj->rubrique;
$this->note = $obj->note; $this->note = $obj->note;