From 09629d32d7b77dbc81e7967499cf81cafe313c79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Feb 2021 14:53:29 +0100 Subject: [PATCH] Fix missing properties in fetch --- htdocs/fourn/class/fournisseur.commande.class.php | 9 ++++++--- htdocs/fourn/class/fournisseur.facture.class.php | 14 +++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f4c493c8b52..e6421b1b7c9 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -139,6 +139,8 @@ class CommandeFournisseur extends CommonOrder public $cond_reglement_id; public $cond_reglement_code; + public $cond_reglement_label; // Label + public $cond_reglement_doc; // Label on documents /** * @var int ID @@ -312,7 +314,7 @@ class CommandeFournisseur extends CommonOrder $sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,"; $sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,"; $sql .= " cm.libelle as methode_commande,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,"; $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; $sql .= ', c.fk_incoterms, c.location_incoterms'; $sql .= ', i.libelle as label_incoterms'; @@ -373,8 +375,9 @@ class CommandeFournisseur extends CommonOrder $this->fk_project = $obj->fk_project; $this->cond_reglement_id = $obj->fk_cond_reglement; $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; + $this->cond_reglement = $obj->cond_reglement_label; // deprecated + $this->cond_reglement_label = $obj->cond_reglement_label; + $this->cond_reglement_doc = $obj->cond_reglement_doc; $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 83408d9ba6c..74be7bcf762 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -176,8 +176,11 @@ class FactureFournisseur extends CommonInvoice public $note_private; public $note_public; public $propalid; + public $cond_reglement_id; public $cond_reglement_code; + public $cond_reglement_label; + public $cond_reglement_doc; /** * @var int ID @@ -641,8 +644,8 @@ class FactureFournisseur extends CommonInvoice $sql .= " t.model_pdf,"; $sql .= " t.import_key,"; $sql .= " t.extraparams,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,"; - $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,"; + $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_label,"; $sql .= ' s.nom as socnom, s.rowid as socid,'; $sql .= ' t.fk_incoterms, t.location_incoterms,'; $sql .= " i.libelle as label_incoterms,"; @@ -697,12 +700,13 @@ class FactureFournisseur extends CommonInvoice $this->fk_project = $obj->fk_project; $this->cond_reglement_id = $obj->fk_cond_reglement; $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle; + $this->cond_reglement = $obj->cond_reglement_label; // deprecated + $this->cond_reglement_label = $obj->cond_reglement_label; + $this->cond_reglement_doc = $obj->cond_reglement_doc; $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; - $this->mode_reglement = $obj->mode_reglement_libelle; + $this->mode_reglement = $obj->mode_reglement_label; $this->date_echeance = $this->db->jdate($obj->date_lim_reglement); $this->note = $obj->note_private; // deprecated $this->note_private = $obj->note_private;