fix: le pays n'tait pas sauvegard, ni affich

This commit is contained in:
Regis Houssin 2006-02-27 19:38:45 +00:00
parent 904fac1d33
commit 69e0d00fd1

View File

@ -175,6 +175,21 @@ class Entrepot
$this->cp = $obj->cp;
$this->ville = $obj->ville;
$this->pays_id = $obj->fk_pays;
if ($soc->pays_id)
{
$sql = "SELECT libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".$this->pays_id;
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
}
else
{
dolibarr_print_error($db);
}
$this->pays=$obj->libelle;
}
$this->db->free($result);
return 1;