Fix: La liste des rapport s'affiche par défaut sur l'année courante.
This commit is contained in:
parent
caa59d43ee
commit
9e987b65e1
@ -39,6 +39,7 @@ if (!$user->admin && $user->societe_id > 0)
|
|||||||
|
|
||||||
|
|
||||||
$year = $_GET["year"];
|
$year = $_GET["year"];
|
||||||
|
if (! $year) { $year=date("Y"); }
|
||||||
|
|
||||||
require("../../includes/modules/rapport/pdf_paiement.class.php");
|
require("../../includes/modules/rapport/pdf_paiement.class.php");
|
||||||
|
|
||||||
@ -63,9 +64,10 @@ llxHeader();
|
|||||||
* Affichage liste des paiements
|
* Affichage liste des paiements
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print_titre("Rapport paiements");
|
print_titre("Rapport paiements".($year?" $year":""));
|
||||||
|
|
||||||
print '<form method="post" action="rapport.php?year='.$year.'">';
|
// Formulaire de génération
|
||||||
|
print '<br><form method="post" action="rapport.php?year='.$year.'">';
|
||||||
print '<input type="hidden" name="action" value="gen">';
|
print '<input type="hidden" name="action" value="gen">';
|
||||||
$cmonth = date("n", time());
|
$cmonth = date("n", time());
|
||||||
$syear = date("Y", time());
|
$syear = date("Y", time());
|
||||||
@ -114,20 +116,24 @@ print "</select>\n";
|
|||||||
print '<input type="submit" value="'.$langs->trans("Create").'">';
|
print '<input type="submit" value="'.$langs->trans("Create").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$handle=opendir($dir);
|
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
if (is_dir($dir)) {
|
||||||
{
|
$handle=opendir($dir);
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.')
|
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.')
|
||||||
{
|
{
|
||||||
print '<a href="rapport.php?year='.$file.'">'.$file.'</a> ';
|
print '<a href="rapport.php?year='.$file.'">'.$file.'</a> ';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($year)
|
if ($year)
|
||||||
{
|
{
|
||||||
|
if (is_dir($dir.'/'.$year)) {
|
||||||
$handle=opendir($dir.'/'.$year);
|
$handle=opendir($dir.'/'.$year);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
@ -146,6 +152,7 @@ if ($year)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user