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 ''; + print '
'; print ''; print ""; + print ""; print ""; print ""; print ''; - print ""; - print "\n"; + print ""; while ($i < $num) { @@ -196,6 +196,7 @@ if ($action == '') { $var=!$var; print ""; print "\n"; + print ''; print "\n"; print "\n"; print '';
FactureSociétéDateTypeMontant 
 
facid\">$objp->facnumber'.$objp->nom.'".strftime("%d %B %Y",$objp->dp)."$objp->paiement_type $objp->num_paiement'.price($objp->amount).'