Qual: Removed dead code

This commit is contained in:
Laurent Destailleur 2011-03-12 00:03:26 +00:00
parent a7a005d894
commit a61cbddc3f

View File

@ -373,94 +373,6 @@ class FactureFournisseur extends Facture
}
}
/**
* \brief Load object from database
* \param rowid id of object to get
* \return int >0 if ok, <0 if ko
*/
function faaetch($rowid)
{
global $conf;
$sql = 'SELECT libelle as label, facnumber, amount, remise, datef as df,';
$sql.= ' total_ht, total_tva, total_ttc, fk_user_author,';
$sql.= ' fk_statut, fk_projet as fk_project, paye, f.note, f.note_public,';
$sql.= ' date_lim_reglement as de, model_pdf, import_key';
$sql.= ' s.nom as socnom, s.rowid as socid';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
$sql.= ' WHERE f.rowid='.$rowid.' AND f.fk_soc = s.rowid';
dol_syslog("FactureFournisseur::Fetch sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
$num=$this->db->num_rows($resql);
if ($num)
{
$obj = $this->db->fetch_object($resql);
$this->id = $rowid;
$this->ref = $this->id;
$this->ref_supplier = $obj->facnumber;
$this->type = 0;
$this->datep = $this->db->jdate($obj->df);
$this->date = $this->db->jdate($obj->df);
$this->date_echeance = $this->db->jdate($obj->de);
$this->libelle = $obj->label; // deprecated
$this->label = $obj->label;
$this->remise = $obj->remise;
$this->socid = $obj->socid;
$this->total_ht = $obj->total_ht;
$this->total_tva = $obj->total_tva;
$this->total_ttc = $obj->total_ttc;
$this->author = $obj->fk_user_author;
$this->statut = $obj->fk_statut;
$this->paye = $obj->paye;
$this->fk_project = $obj->fk_project;
$this->socid = $obj->socid;
$this->socnom = $obj->socnom;
$this->note = $obj->note;
$this->note_public = $obj->note_public;
$this->model_pdf = $obj->model_pdf;
$this->import_key = $obj->import_key;
$this->db->free($resql);
// Lines
$result=$this->fetch_lines();
if ($result < 0)
{
$this->error=$this->db->error();
dol_syslog('FactureFournisseur::Fetch Error '.$this->error, LOG_ERR);
return -3;
}
return 1;
}
else
{
$this->error='Bill with id '.$rowid.' not found sql='.$sql;
dol_syslog('FactureFournisseur::Fetch rowid='.$rowid.' numrows=0 sql='.$sql);
dol_print_error('',$sql);
return -2;
}
}
else
{
dol_syslog('FactureFournisseur::Fetch rowid='.$rowid.' Erreur dans fetch de la facture fournisseur');
$this->error=$this->db->error();
dol_print_error($this->db);
return -1;
}
}
/**
* \brief Load this->lines