From f9e2b56530adc3e60f6e7236b5a0e802caeda6ca Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 5 Jan 2005 16:28:46 +0000 Subject: [PATCH] Ajout mode_reglement dans le fetch --- htdocs/facture.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 78765ebdf3a..b9e827705d1 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -275,8 +275,14 @@ class Facture */ function fetch($rowid, $societe_id=0) { - $sql = "SELECT f.fk_soc,f.facnumber,f.amount,f.tva,f.total,f.total_ttc,f.remise,f.remise_percent,".$this->db->pdate("f.datef")." as df,f.fk_projet,".$this->db->pdate("f.date_lim_reglement")." as dlr, c.rowid as cond_regl_id, c.libelle, c.libelle_facture, f.note, f.paye, f.fk_statut, f.fk_user_author"; - $sql .= " , fk_mode_reglement"; + dolibarr_syslog("Facture::Fetch"); + + $sql = "SELECT f.fk_soc,f.facnumber,f.amount,f.tva,f.total,f.total_ttc,f.remise,f.remise_percent"; + $sql .= ",".$this->db->pdate("f.datef")." as df,f.fk_projet"; + $sql .= ",".$this->db->pdate("f.date_lim_reglement")." as dlr"; + $sql .= ", c.rowid as cond_regl_id, c.libelle, c.libelle_facture"; + $sql .= ", f.note, f.paye, f.fk_statut, f.fk_user_author"; + $sql .= ", fk_mode_reglement"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."cond_reglement as c"; $sql .= " WHERE f.rowid=$rowid AND c.rowid = f.fk_cond_reglement"; @@ -313,6 +319,8 @@ class Facture $this->user_author = $obj->fk_user_author; $this->lignes = array(); + $this->mode_reglement = $obj->fk_mode_reglement; + if ($this->statut == 0) { $this->brouillon = 1;