diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 438e88af15a..0622157611a 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -180,8 +180,9 @@ if ($socid > 0) * Liste des projets associés * */ - $sql = "SELECT p.rowid,p.title,p.ref,".$db->pdate("p.dateo")." as do"; - $sql .= " FROM llx_projet as p WHERE p.fk_soc = $objsoc->idp"; + $sql = "SELECT p.rowid,p.libelle,p.facnumber,".$db->pdate("p.datef")." as df"; + $sql .= " FROM llx_facture_fourn as p WHERE p.fk_soc = $objsoc->idp"; + $sql .= " ORDER BY p.rowid DESC LIMIT 0,4"; if ( $db->query($sql) ) { print ''; @@ -189,17 +190,19 @@ if ($socid > 0) $num = $db->num_rows(); if ($num > 0) { - $tag = !$tag; - print ""; - print ""; + print ''; + print ""; } while ($i < $num && $i < 5) { $obj = $db->fetch_object( $i); $tag = !$tag; print ""; - print ''; - print ""; + print ''; + print ""; $i++; } $db->free();
idp\">liste des projets ($num)
idp\">liste des factures
'.$obj->title.'".strftime("%d %b %Y", $obj->do) ."
'; + print ''; + print img_file(); + print $obj->facnumber.' '.$obj->libelle.'".strftime("%d %b %Y", $obj->df) ."