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].'';