fix: le pays n'tait pas sauvegard

This commit is contained in:
Regis Houssin
2006-02-27 19:26:24 +00:00
parent 4b85b30d9b
commit 872fcab175
2 changed files with 3 additions and 3 deletions

View File

@@ -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) )

View File

@@ -211,7 +211,7 @@ else
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$entrepot->ville.'</td></tr>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
$entrepot->pays_id;
print $entrepot->pays_id;
print '</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td colspan="3">'.$entrepot->statuts[$entrepot->statut].'</td></tr>';