diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 290bddedd87..f290be18515 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -159,10 +159,10 @@ if ($action == '') { $limit = $conf->liste_limit; $offset = $limit * $page ; - $sql = "SELECT ".$db->pdate("p.datep")." as dp, p.amount, f.amount as fa_amount, f.facnumber"; + $sql = "SELECT ".$db->pdate("p.datep")." as dp, p.amount, f.amount as fa_amount, f.facnumber, s.nom"; $sql .=", f.rowid as facid, c.libelle as paiement_type, p.num_paiement"; - $sql .= " FROM llx_paiementfourn as p, llx_facture_fourn as f, c_paiement as c"; - $sql .= " WHERE p.fk_facture_fourn = f.rowid AND p.fk_paiement = c.id"; + $sql .= " FROM llx_paiementfourn as p, llx_facture_fourn as f, c_paiement as c, societe as s"; + $sql .= " WHERE p.fk_facture_fourn = f.rowid AND p.fk_paiement = c.id AND s.idp = f.fk_soc"; if ($socidp) { @@ -181,14 +181,14 @@ if ($action == '') { print_barre_liste("Paiements", $page, $PHP_SELF); - print '
| Facture | "; + print "Société | "; print "Date | "; print "Type | "; print 'Montant | '; - print ""; - print " | "; while ($i < $num) { @@ -196,6 +196,7 @@ if ($action == '') { $var=!$var; print " |
| facid\">$objp->facnumber | \n"; + print ''.$objp->nom.' | '; print "".strftime("%d %B %Y",$objp->dp)." | \n"; print "$objp->paiement_type $objp->num_paiement | \n"; print ''.price($objp->amount).' | '; |