Fix missing field into response
This commit is contained in:
parent
25a3f8a8fd
commit
80ac99e9b1
@ -2849,9 +2849,10 @@ class Facture extends CommonInvoice
|
||||
$field2='fk_paiementfourn';
|
||||
}
|
||||
|
||||
$sql = 'SELECT pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, t.code';
|
||||
$sql = 'SELECT 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';
|
||||
$sql.= ' AND pf.'.$field2.' = p.rowid';
|
||||
$sql.= ' AND p.fk_paiement = t.id';
|
||||
if ($filtertype) $sql.=" AND t.code='PRE'";
|
||||
@ -2865,7 +2866,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);
|
||||
$retarray[]=array('amount'=>$obj->amount,'type'=>$obj->code, 'date'=>$obj->datep, 'num'=>$obj->num);
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user