diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8473cd79a76..8ead4f3f7b5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3098,7 +3098,7 @@ class Form /** * \brief Return HTML combo list of years - * \param selected Preselected value + * \param selected Preselected value (''=current year, -1=none, year otherwise) * \param htmlname Name of HTML select object * \param useempty Affiche valeur vide dans liste * \param $min_year Valeur minimum de l'annee dans la liste (par defaut annee courante -10) @@ -3115,19 +3115,14 @@ class Form print '\n"; } diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index f6a21d116e9..d6bfbc7ba1a 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -204,10 +204,9 @@ if ($resql) print ''; print ''; //print ' '.$langs->trans('Year').': '; - $max_year = date("Y"); $syear = $year; //if ($syear == '') $syear = date("Y"); - $html->select_year($syear,'year',1, '', $max_year); + $html->select_year($syear?$syear:-1,'year',1, 10, 10); print ''; print ' '; print '';