fiche_def_ref=FICHE_TYPE_FOURNISSEUR; parent::__construct($p_cn,$p_id) ; } /*! \brief Get all info contains in the view * thanks to the poste elt (account) */ function get_by_account($p_poste=0) { $this->poste=($p_poste==0)?$this->poste:$p_poste; $sql="select * from vw_supplier where poste_comptable=".$this->poste; $Res=$this->cn->exec_sql($sql); if ( Database::num_row($Res) == 0) return null; // There is only _one_ row by supplier $row=Database::fetch_array($Res,0); $this->name=$row['name']; $this->id=$row['f_id']; $this->street=$row['rue']; $this->cp=$row['code_postal']; $this->country=$row['pays']; $this->vat_number=$row['tva_num']; } } ?>