From 3ecccadb8b8aafd8e9013425a386c96f39565e51 Mon Sep 17 00:00:00 2001 From: Neil Orley Date: Fri, 3 Nov 2017 13:04:23 +0100 Subject: [PATCH] NEW Adds the payment reference to the return of the function getListOfPayements Adds the payment reference to the return of the function getListOfPayements --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6f36bd016b4..0da4dc2bc57 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3193,7 +3193,7 @@ class Facture extends CommonInvoice $field2='fk_paiementfourn'; } - $sql = 'SELECT pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code'; + $sql = 'SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code'; $sql.= ' FROM '.MAIN_DB_PREFIX.$table.' as pf, '.MAIN_DB_PREFIX.$table2.' as p, '.MAIN_DB_PREFIX.'c_paiement as t'; $sql.= ' WHERE pf.'.$field.' = '.$this->id; //$sql.= ' WHERE pf.'.$field.' = 1'; @@ -3211,7 +3211,7 @@ class Facture extends CommonInvoice while ($i < $num) { $obj = $this->db->fetch_object($resql); - $retarray[]=array('amount'=>$obj->amount,'type'=>$obj->code, 'date'=>$obj->datep, 'num'=>$obj->num); + $retarray[]=array('amount'=>$obj->amount,'type'=>$obj->code, 'date'=>$obj->datep, 'num'=>$obj->num, 'ref'=>$obj->ref); $i++; } $this->db->free($resql);