From 872fcab17556f5fb3dcad07f9cad5c5becc3c24e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 27 Feb 2006 19:26:24 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20le=20pays=20n'=E9tait=20pas=20sauvegard?= =?UTF-8?q?=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/stock/entrepot.class.php | 4 ++-- htdocs/product/stock/fiche.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stock/entrepot.class.php b/htdocs/product/stock/entrepot.class.php index 22dc04aa1de..f87b61d06fb 100644 --- a/htdocs/product/stock/entrepot.class.php +++ b/htdocs/product/stock/entrepot.class.php @@ -125,7 +125,7 @@ class Entrepot $this->address=trim($this->address); $this->cp=trim($this->cp); $this->ville=trim($this->ville); - $this->pays_id=trim($this->pays_id); + $this->pays_id=trim($this->pays_id?$this->pays_id:0); $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; $sql .= " SET label = '" . $this->libelle ."'"; @@ -135,7 +135,7 @@ class Entrepot $sql .= ",address = '" . $this->address ."'"; $sql .= ",cp = '" . $this->cp ."'"; $sql .= ",ville = '" . $this->ville ."'"; - $sql .= ",fk_pays = " . $this->pays_id?$this->pays_id:'0' ; + $sql .= ",fk_pays = " . $this->pays_id; $sql .= " WHERE rowid = " . $id; if ( $this->db->query($sql) ) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 56fb72acbff..483a972cb63 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -211,7 +211,7 @@ else print ''.$langs->trans('Town').''.$entrepot->ville.''; print ''.$langs->trans('Country').''; - $entrepot->pays_id; + print $entrepot->pays_id; print ''; print ''.$langs->trans("Status").''.$entrepot->statuts[$entrepot->statut].'';