Contract never shown on interventions

Column fk_contrat is never read from the database, so it is never shown
in the corresponding field of the intervention, even though you have set
it choosing the contract from the dropdown.
This commit is contained in:
Damian Serrano Thode 2014-08-29 11:34:07 +02:00
parent e4dbf6a9e4
commit 4fe83ebbf9

View File

@ -278,7 +278,7 @@ class Fichinter extends CommonObject
$sql.= " f.datec,";
$sql.= " f.date_valid as datev,";
$sql.= " f.tms as datem,";
$sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams";
$sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat";
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f";
if ($ref) $sql.= " WHERE f.ref='".$this->db->escape($ref)."'";
else $sql.= " WHERE f.rowid=".$rowid;
@ -304,6 +304,7 @@ class Fichinter extends CommonObject
$this->note_public = $obj->note_public;
$this->note_private = $obj->note_private;
$this->modelpdf = $obj->model_pdf;
$this->fk_contrat = $obj->fk_contrat;
$this->extraparams = (array) json_decode($obj->extraparams, true);