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;
|
||||
@ -1018,9 +1018,9 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$head = propal_prepare_head($object);
|
||||
dol_fiche_head($head, 'comm', $langs->trans('Proposal'), 0, 'propal');
|
||||
|
||||
|
||||
$formconfirm='';
|
||||
|
||||
|
||||
// Clone confirmation
|
||||
if ($action == 'clone')
|
||||
{
|
||||
@ -1078,7 +1078,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
|
||||
}
|
||||
|
||||
|
||||
// Hook of thirdparty module
|
||||
if (empty($formconfirm) && ! empty($object->hooks))
|
||||
{
|
||||
@ -1087,7 +1087,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if (empty($formconfirm)) $formconfirm = $module->formconfirm($action,$object,$lineid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
@ -1312,7 +1312,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Origine de la demande
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
@ -1465,7 +1465,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Show object lines
|
||||
if (! empty($object->lines)) $object->printObjectLines($action,$mysoc,$soc,$lineid);
|
||||
|
||||
|
||||
//print '<table id="tablelines" class="noborder" width="100%">';
|
||||
|
||||
/*
|
||||
@ -1841,10 +1841,9 @@ else
|
||||
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('Year').': ';
|
||||
$max_year = date("Y");
|
||||
$syear = $year;
|
||||
//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 class="liste_titre" colspan="1"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
|
||||
@ -1871,7 +1871,7 @@ else
|
||||
$head = facture_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill');
|
||||
|
||||
|
||||
$formconfirm='';
|
||||
|
||||
// Confirmation de la conversion de l'avoir en reduc
|
||||
@ -2014,7 +2014,7 @@ else
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||
}
|
||||
|
||||
|
||||
// Hook of thirdparty module
|
||||
if (empty($formconfirm) && ! empty($object->hooks))
|
||||
{
|
||||
@ -2023,7 +2023,7 @@ else
|
||||
if (empty($formconfirm)) $formconfirm = $module->formconfirm($action,$object,$lineid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
@ -3044,10 +3044,9 @@ else
|
||||
print '<td class="liste_titre" colspan="1" align="center">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
//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,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
|
||||
@ -622,11 +622,10 @@ else
|
||||
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('Year').': ';
|
||||
$max_year = date("Y");
|
||||
$syear = $year;
|
||||
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 class="liste_titre" align="right">';
|
||||
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
|
||||
* \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 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)
|
||||
* Return HTML combo list of years
|
||||
* @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 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)
|
||||
* TODO Move into html.formother
|
||||
*/
|
||||
function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5)
|
||||
|
||||
@ -206,7 +206,7 @@ if ($resql)
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
//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 class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
|
||||
@ -264,7 +264,7 @@ if ($resql)
|
||||
print ' '.$langs->trans('Year').': ';
|
||||
$max_year = date("Y");
|
||||
$syear = $year;
|
||||
$form->select_year($syear,'year',1, '', $max_year);
|
||||
$form->select_year($syear,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
// Label of movement
|
||||
print '<td class="liste_titre" align="left">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user