diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 03dd805432a..15ea58f75f5 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -95,7 +95,7 @@ if ($sortfield == "") } -$sql = "SELECT s.idp as socid, s.nom, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, s.prefix_comm, fac.total_ht, fac.paye, fac.libelle, ".$db->pdate("fac.datef")." as datef, fac.rowid as facid, fac.facnumber"; +$sql = "SELECT s.idp as socid, s.nom, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, s.prefix_comm, fac.total_ht, fac.total_ttc, fac.paye, fac.libelle, ".$db->pdate("fac.datef")." as datef, fac.rowid as facid, fac.facnumber"; $sql .= " FROM llx_societe as s, llx_facture_fourn as fac "; $sql .= " WHERE fac.fk_soc = s.idp"; @@ -124,12 +124,20 @@ if ($result) print "
| Numéro | '; - print 'Date | '; - print 'Libellé | '; + print ' | '; + print_liste_field_titre("Date",$PHP_SELF,"fac.datef"); + print ' | '; + print 'Libellé | '; + print ''; print_liste_field_titre("Société",$PHP_SELF,"s.nom"); - print ' | '; - print_liste_field_titre("Montant",$PHP_SELF,"fac.total_ht"); - print ' | Payé | '; + print ''; + print ''; + print_liste_field_titre("Montant HT",$PHP_SELF,"fac.total_ht"); + print ' | '; + print ''; + print_liste_field_titre("Montant TTC",$PHP_SELF,"fac.total_ttc"); + print ' | '; + print 'Payé | '; print "
| facid\">$obj->facnumber | \n"; - print "facid\">".strftime("%d %b %Y",$obj->datef)." | \n"; - print ''.stripslashes("$obj->libelle").' | '; + print "".strftime("%d %b %Y",$obj->datef)." | \n"; + print ''.stripslashes("$obj->libelle").' | '; print "socid\">$obj->nom | \n"; print ''.price($obj->total_ht).' | '; - - print ''.$yn[$obj->paye].' | '; + print ''.price($obj->total_ttc).' | '; + print ''.($obj->paye||$obj->total_ht==0?"":"").($obj->total_ht==0?"brouillon":$yn[$obj->paye]).($obj->paye||$obj->total_ht==0?"":"").' | '; print "