From d199656812da408b808760c30d178e53837d7e60 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Jan 2009 22:50:58 +0000 Subject: [PATCH] Sort years --- htdocs/compta/paiement/rapport.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 7c138462cce..1571cc88b77 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -59,7 +59,7 @@ if ($_POST["action"] == 'gen') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - + // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; @@ -73,7 +73,7 @@ if ($_POST["action"] == 'gen') dolibarr_syslog("Erreur dans commande_pdf_create"); dolibarr_print_error($db,$obj->pdferror()); } - + $year = $_POST["reyear"]; } @@ -85,7 +85,7 @@ if ($_POST["action"] == 'gen') llxHeader(); $titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports")); -print_titre($titre); +print_fiche_titre($titre); // Formulaire de génération print '
'; @@ -135,11 +135,16 @@ if (is_dir($dir)) { if (is_dir($dir.'/'.$file) && ! eregi('^\.',$file)) { - $found=1; - print ''.$file.' '; + $found=1; + $linkforyear[]=$file; } } } +asort($linkforyear); +foreach($linkforyear as $cursoryear) +{ + print ''.$cursoryear.'  '; +} if ($year) {