Fix: Select a date year now show past and future date.
This commit is contained in:
parent
6da49f1960
commit
cf862a2286
@ -1,31 +0,0 @@
|
|||||||
-- ===========================================================================
|
|
||||||
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
--
|
|
||||||
-- 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
|
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
|
||||||
-- (at your option) any later version.
|
|
||||||
--
|
|
||||||
-- This program is distributed in the hope that it will be useful,
|
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
-- GNU General Public License for more details.
|
|
||||||
--
|
|
||||||
-- You should have received a copy of the GNU General Public License
|
|
||||||
-- along with this program; if not, write to the Free Software
|
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
--
|
|
||||||
-- $Id$
|
|
||||||
-- ===========================================================================
|
|
||||||
|
|
||||||
CREATE TABLE llx_pos_tmp (
|
|
||||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
|
||||||
fk_article integer NOT NULL,
|
|
||||||
qte real NOT NULL,
|
|
||||||
fk_tva integer NOT NULL,
|
|
||||||
remise_percent real NOT NULL,
|
|
||||||
remise real NOT NULL,
|
|
||||||
total_ht double(24,8) NOT NULL,
|
|
||||||
total_tva double(24,8) NOT NULL,
|
|
||||||
total_ttc double(24,8) NOT NULL
|
|
||||||
) ENGINE=innodb;
|
|
||||||
@ -1841,10 +1841,9 @@ else
|
|||||||
print '<td class="liste_titre" colspan="1" align="right">';
|
print '<td class="liste_titre" colspan="1" align="right">';
|
||||||
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||||
print ' '.$langs->trans('Year').': ';
|
print ' '.$langs->trans('Year').': ';
|
||||||
$max_year = date("Y");
|
|
||||||
$syear = $year;
|
$syear = $year;
|
||||||
//if($syear == '') $syear = date("Y");
|
//if($syear == '') $syear = date("Y");
|
||||||
$html->select_year($syear,'year',1, '', $max_year);
|
$html->select_year($syear,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" colspan="1"> </td>';
|
print '<td class="liste_titre" colspan="1"> </td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
|
|||||||
@ -3044,10 +3044,9 @@ else
|
|||||||
print '<td class="liste_titre" colspan="1" align="center">';
|
print '<td class="liste_titre" colspan="1" align="center">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||||
//print ' '.$langs->trans('Year').': ';
|
//print ' '.$langs->trans('Year').': ';
|
||||||
$max_year = date("Y");
|
|
||||||
$syear = $year;
|
$syear = $year;
|
||||||
//if ($syear == '') $syear = date("Y");
|
//if ($syear == '') $syear = date("Y");
|
||||||
$html->select_year($syear,'year',1, '', $max_year);
|
$html->select_year($syear,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left"> </td>';
|
print '<td class="liste_titre" align="left"> </td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
|
|||||||
@ -622,11 +622,10 @@ else
|
|||||||
print '<td class="liste_titre" colspan="1" align="right">';
|
print '<td class="liste_titre" colspan="1" align="right">';
|
||||||
print $langs->trans('Month').': <input class="flat" type="text" size="2" maxlength="2" name="month" value="'.$month.'">';
|
print $langs->trans('Month').': <input class="flat" type="text" size="2" maxlength="2" name="month" value="'.$month.'">';
|
||||||
print ' '.$langs->trans('Year').': ';
|
print ' '.$langs->trans('Year').': ';
|
||||||
$max_year = date("Y");
|
|
||||||
$syear = $year;
|
$syear = $year;
|
||||||
if($syear == '')
|
if($syear == '')
|
||||||
$syear = date("Y");
|
$syear = date("Y");
|
||||||
$html->select_year($syear,'year',1, '', $max_year);
|
$html->select_year($syear,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
print '<input class="flat" type="text" size="10" name="search_montant_ht" value="'.$_GET['search_montant_ht'].'">';
|
print '<input class="flat" type="text" size="10" name="search_montant_ht" value="'.$_GET['search_montant_ht'].'">';
|
||||||
|
|||||||
@ -3301,12 +3301,12 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return HTML combo list of years
|
* Return HTML combo list of years
|
||||||
* \param selected Preselected value (''=current year, -1=none, year otherwise)
|
* @param selected Preselected value (''=current year, -1=none, year otherwise)
|
||||||
* \param htmlname Name of HTML select object
|
* @param htmlname Name of HTML select object
|
||||||
* \param useempty Affiche valeur vide dans liste
|
* @param useempty Affiche valeur vide dans liste
|
||||||
* \param $min_year Offset of minimum year into list (by default current year -10)
|
* @param $min_year Offset of minimum year into list (by default current year -10)
|
||||||
* \param $max_year Offset of maximum year into list (by default current year + 5)
|
* @param $max_year Offset of maximum year into list (by default current year + 5)
|
||||||
* TODO Move into html.formother
|
* TODO Move into html.formother
|
||||||
*/
|
*/
|
||||||
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5)
|
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5)
|
||||||
|
|||||||
@ -206,7 +206,7 @@ if ($resql)
|
|||||||
//print ' '.$langs->trans('Year').': ';
|
//print ' '.$langs->trans('Year').': ';
|
||||||
$syear = $year;
|
$syear = $year;
|
||||||
//if ($syear == '') $syear = date("Y");
|
//if ($syear == '') $syear = date("Y");
|
||||||
$html->select_year($syear?$syear:-1,'year',1, 10, 10);
|
$html->select_year($syear?$syear:-1,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
|
|||||||
@ -264,7 +264,7 @@ if ($resql)
|
|||||||
print ' '.$langs->trans('Year').': ';
|
print ' '.$langs->trans('Year').': ';
|
||||||
$max_year = date("Y");
|
$max_year = date("Y");
|
||||||
$syear = $year;
|
$syear = $year;
|
||||||
$form->select_year($syear,'year',1, '', $max_year);
|
$form->select_year($syear,'year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Label of movement
|
// Label of movement
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user