From 90692d8a54658e2fe8f750f68b4ff16e2672d44b Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 16 Feb 2004 17:13:25 +0000 Subject: [PATCH] =?UTF-8?q?Supprime=20les=20espaces=20dans=20les=20num=E9r?= =?UTF-8?q?os=20de=20t=E9l=E9phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/societe.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 942d54b5352..222a8d40d44 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -91,8 +91,9 @@ class Societe { $sql .= ",address = '" . trim($this->adresse) ."'"; $sql .= ",cp = '" . trim($this->cp) ."'"; $sql .= ",ville = '" . trim($this->ville) ."'"; - $sql .= ",tel = '" . trim($this->tel) ."'"; - $sql .= ",fax = '" . trim($this->fax) ."'"; + $sql .= ",fk_departement = " . $this->departement_id; + $sql .= ",tel = '" . ereg_replace(" ","",$this->tel) ."'"; + $sql .= ",fax = '" . ereg_replace(" ","",$this->fax) ."'"; $sql .= ",url = '" . trim($this->url) ."'"; $sql .= ",siren = '" . trim($this->siren) ."'"; $sql .= ",siret = '" . trim($this->siret) ."'"; @@ -124,6 +125,7 @@ class Societe { $sql .= ", s.siret, s.capital, s.ape, s.tva_intra, s.rubrique, s.fk_effectif"; $sql .= ", e.libelle as effectif, e.id as effectif_id"; $sql .= ", s.fk_forme_juridique as forme_juridique_id, fj.libelle as forme_juridique"; + $sql .= ", s.fk_departement"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."c_effectif as e"; $sql .= ", ".MAIN_DB_PREFIX."c_forme_juridique as fj"; @@ -143,7 +145,7 @@ class Societe { $this->adresse = stripslashes($obj->address); $this->cp = $obj->cp; $this->ville = stripslashes($obj->ville); - + $this->departement_id = $obj->fk_departement; $this->url = $obj->url; $this->tel = $obj->tel;