Sort years
This commit is contained in:
parent
dfb4b37c9a
commit
d199656812
@ -59,7 +59,7 @@ if ($_POST["action"] == 'gen')
|
|||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We save charset_output to restore it because write_file can change it if needed for
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
// output format that does not support UTF8.
|
// output format that does not support UTF8.
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
@ -73,7 +73,7 @@ if ($_POST["action"] == 'gen')
|
|||||||
dolibarr_syslog("Erreur dans commande_pdf_create");
|
dolibarr_syslog("Erreur dans commande_pdf_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
}
|
}
|
||||||
|
|
||||||
$year = $_POST["reyear"];
|
$year = $_POST["reyear"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ if ($_POST["action"] == 'gen')
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports"));
|
$titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports"));
|
||||||
print_titre($titre);
|
print_fiche_titre($titre);
|
||||||
|
|
||||||
// Formulaire de génération
|
// Formulaire de génération
|
||||||
print '<br><form method="post" action="rapport.php?year='.$year.'">';
|
print '<br><form method="post" action="rapport.php?year='.$year.'">';
|
||||||
@ -135,11 +135,16 @@ if (is_dir($dir))
|
|||||||
{
|
{
|
||||||
if (is_dir($dir.'/'.$file) && ! eregi('^\.',$file))
|
if (is_dir($dir.'/'.$file) && ! eregi('^\.',$file))
|
||||||
{
|
{
|
||||||
$found=1;
|
$found=1;
|
||||||
print '<a href="rapport.php?year='.$file.'">'.$file.'</a> ';
|
$linkforyear[]=$file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
asort($linkforyear);
|
||||||
|
foreach($linkforyear as $cursoryear)
|
||||||
|
{
|
||||||
|
print '<a href="rapport.php?year='.$cursoryear.'">'.$cursoryear.'</a> ';
|
||||||
|
}
|
||||||
|
|
||||||
if ($year)
|
if ($year)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user