diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 3cfa2b8c380..52bcf961fd4 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -1,7 +1,7 @@ - * Copyright (C) 2004 �ric Seigne - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2009 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +19,11 @@ */ /** - \file htdocs/fourn/facture/impayees.php - \ingroup facture - \brief Page de liste des factures fournisseurs impay�es - \version $Id$ -*/ + * \file htdocs/fourn/facture/impayees.php + * \ingroup facture + * \brief Page to list all unpayed invoices + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"); @@ -39,7 +39,7 @@ $langs->load("bills"); if ($_GET["socid"]) { $socid=$_GET["socid"]; } -// S�curit� acc�s client +// Security check if ($user->societe_id > 0) { $action = ''; @@ -55,7 +55,10 @@ $now=gmmktime(); llxHeader('',$langs->trans("BillsSuppliersUnpayed")); +$facturestatic=new FactureFournisseur($db); +$companystatic=new Societe($db); + /*************************************************************************** * * * Mode Liste * @@ -185,9 +188,6 @@ if ($user->rights->fournisseur->facture->lire) print ''; - $facturestatic=new FactureFournisseur($db); - - if ($num > 0) { $var=True; @@ -204,17 +204,24 @@ if ($user->rights->fournisseur->facture->lire) print ""; $class = "impayee"; - print ''.img_object($langs->trans("ShowBill"),"bill")." "; - print ''.$objp->ref.''; - if ($objp->datelimite < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); + print ''; + $facturestatic->id=$objp->facid; + $facturestatic->ref=$objp->ref; + print $facturestatic->getNomUrl(1); print "\n"; print "".dol_trunc($objp->facnumber,12)."\n"; print "".dol_print_date($objp->df)."\n"; - print "".dol_print_date($objp->datelimite)."\n"; + print "".dol_print_date($objp->datelimite); + if ($objp->datelimite < ($now - $conf->facture->fournisseur->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); + print "\n"; - print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,32).''; + print ''; + $companystatic->id=$objp->socid; + $companystatic->nom=$objp->nom; + print $companystatic->getNomUrl(1,'supplier',32); + print ''; print "".price($objp->total_ht).""; print "".price($objp->total_ttc)."";