diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index ff5a3b2fffd..311335fd96b 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -8,6 +8,7 @@ * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018 Frédéric France * * 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 @@ -666,7 +667,7 @@ if ($resql) } print ''; print ''; - $form->select_date(empty($dateop)?-1:$dateop,'op',0,0,0,'transaction'); + print $form->selectDate(empty($dateop)?-1:$dateop, 'op', 0, 0, 0, 'transaction'); print ''; print ' '; print ''; @@ -787,17 +788,17 @@ if ($resql) $moreforfilter.='
'; $moreforfilter .= $langs->trans('DateOperationShort').' : '; $moreforfilter .= '
'.$langs->trans('From') . ' '; - $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1).'
'; + $moreforfilter .= $form->selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0).'
'; //$moreforfilter .= ' - '; - $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1).'
'; + $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0).'
'; $moreforfilter .= ''; $moreforfilter.='
'; $moreforfilter .= $langs->trans('DateValueShort').' : '; $moreforfilter .= '
'.$langs->trans('From') . ' '; - $moreforfilter .= $form->select_date($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0, 1).'
'; + $moreforfilter .= $form->selectDate($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0).'
'; //$moreforfilter .= ' - '; - $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->select_date($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 1).'
'; + $moreforfilter .= '
'.$langs->trans('to') . ' ' . $form->selectDate($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0).'
'; $moreforfilter .= ''; if (! empty($conf->categorie->enabled)) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 461d193d1fe..4a9ddb34a5c 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -6,6 +6,7 @@ * Copyright (C) 2014-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García + * Copyright (C) 2018 Frédéric France * * 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 @@ -431,7 +432,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; print ''; - $form->select_date('', 're', 0, 0, 0, 'formsoc'); + print $form->selectDate('', 're', 0, 0, 0, 'formsoc'); print ''; print ''.$langs->trans("BalanceMinimalAllowed").''; diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index e75250a830c..85cd839fd44 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -7,6 +7,7 @@ * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García + * Copyright (C) 2018 Frédéric France * * 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 @@ -497,7 +498,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; - print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); + print $form->selectDate($db->jdate($objp->do), 'dateo', '', '', '', 'update', 1, 0, $objp->rappro); if (! $objp->rappro) { print '   '; @@ -521,7 +522,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; - print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); + print $form->selectDate($db->jdate($objp->dv), 'datev', '', '', '', 'update', 1, 0, $objp->rappro); if (! $objp->rappro) { print '   '; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 7ad8bc2ad96..38109b964b4 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -5,6 +5,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García + * Copyright (C) 2018 Frédéric France * * 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 @@ -253,7 +254,7 @@ $form->select_comptes($account_to, 'account_to', 0, '', 1, '', empty($conf->mult print "\n"; print ""; -$form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); +print $form->selectDate((! empty($dateo)?$dateo:''), '', '', '', '', 'add'); print "\n"; print ''; print ''; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 1e8fa358929..861ee6e897f 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -3,7 +3,8 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2018 Frédéric France * * 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 @@ -20,8 +21,8 @@ */ /** - * \file htdocs/compta/deplacement/card.php - * \brief Page to show a trip card + * \file htdocs/compta/deplacement/card.php + * \brief Page to show a trip card */ require '../../main.inc.php'; @@ -263,7 +264,7 @@ if ($action == 'create') print ""; print ''.$langs->trans("Date").''; - print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1); + print $form->selectDate($datec?$datec:-1, '', '', '', '', 'add', 1, 1); print ''; // Km @@ -360,7 +361,7 @@ else if ($id) // Date print ''.$langs->trans("Date").''; - print $form->select_date($object->date,'',0,0,0,'update',1,0,1); + print $form->selectDate($object->date, '', 0, 0, 0, 'update', 1, 0); print ''; // Km diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index c58a61032ef..222423b7c67 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -1,6 +1,7 @@ - * Copyright (C) 2015 Marcos García +/* Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2015 Marcos García + * Copyright (C) 2018 Frédéric France * * 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 @@ -172,11 +173,11 @@ if ($action == 'create') print ""; print ''.$langs->trans("DatePayment").''; - print $form->select_date($datep,"datep",'','','','add',1,1); + print $form->selectDate($datep, "datep", '', '', '', 'add', 1, 1); print ''; print ''.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; - print $form->select_date($datev,"datev",'','','','add',1,1); + print $form->selectDate($datev, "datev", '', '', '', 'add', 1, 1); print ''; // Label @@ -302,4 +303,3 @@ if ($id) // End of page llxFooter(); $db->close(); - diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index ce76d74b803..8f986697a01 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -1,6 +1,7 @@ - * Copyright (C) 2014 Ferran Marcet +/* Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2018 Frédéric France * * 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 @@ -117,7 +118,7 @@ if ($calc==0 || $calc==1) // Calculate on invoice for goods and services { $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; @@ -134,7 +135,7 @@ if ($calc==2) // Invoice for goods, payment for services { $calcmode=$langs->trans("CalcModeLT2Debt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 065c935c600..1e2c26c0c62 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -1,7 +1,8 @@ - * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2018 Laurent Destailleur +/* Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2018 Laurent Destailleur + * Copyright (C) 2018 Frédéric France * * 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 @@ -223,7 +224,7 @@ $calcmode.= '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/adm //if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
'.$langs->trans("ThisIsAnEstimatedValue"); -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); +$period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $builddate=dol_now(); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 17a54f9e3f3..e49f42bb14f 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2006-2007 Yannick Warnier * Copyright (C) 2014-2016 Juanjo Menent + * Copyright (C) 2018 Frédéric France * * 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 @@ -132,18 +133,22 @@ if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices'); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; // Set period -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); -$prevyear=$year_start; $prevquarter=$q; +$period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); +$prevyear=$year_start; +$prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; } else { - $prevquarter=4; $prevyear--; + $prevquarter=4; + $prevyear--; } -$nextyear=$year_start; $nextquarter=$q; +$nextyear=$year_start; +$nextquarter=$q; if ($nextquarter < 4) { $nextquarter++; } else { - $nextquarter=1; $nextyear++; + $nextquarter=1; + $nextyear++; } $description.=$fsearch; $builddate=dol_now(); @@ -209,7 +214,7 @@ if (! is_array($x_coll) || ! is_array($x_paye)) $langs->load("errors"); if ($x_coll == -1) print ''.$langs->trans("ErrorNoAccountancyModuleLoaded").''; - else if ($x_coll == -2) + elseif ($x_coll == -2) print ''.$langs->trans("FeatureNotYetAvailable").''; else print ''.$langs->trans("Error").''; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 3d8cf0a38ab..2cd8fb4447a 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -3,6 +3,7 @@ * Copyright (C) 2014 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Charlie BENKE + * Copyright (C) 2018 Frédéric France * * 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 @@ -255,13 +256,13 @@ if ($action == 'create') // Date payment print ''; print fieldLabel('DatePayment','datep',1).''; - print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); + print $form->selectDate((empty($datep)?-1:$datep), "datep", '', '', '', 'add', 1, 1); print ''; // Date value for bank print ''; print fieldLabel('DateValue','datev',0).''; - print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); + print $form->selectDate((empty($datev)?-1:$datev), "datev", '', '', '', 'add', 1, 1); print ''; // Employee @@ -280,13 +281,13 @@ if ($action == 'create') // Date start period print ''; print fieldLabel('DateStartPeriod','datesp',1).''; - print $form->select_date($datesp,"datesp",'','','','add'); + print $form->selectDate($datesp, "datesp", '', '', '', 'add'); print ''; // Date end period print ''; print fieldLabel('DateEndPeriod','dateep',1).''; - print $form->select_date($dateep,"dateep",'','','','add'); + print $form->selectDate($dateep, "dateep", '', '', '', 'add'); print ''; // Amount diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index a5fcfe076e4..a543cc13137 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -9,6 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2016-2017 Alexandre Spangaro + * Copyright (C) 2018 Frédéric France * * 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 @@ -1955,12 +1956,12 @@ if ($action == 'create') // Date invoice print ''.$langs->trans('DateInvoice').''; - $form->select_date($dateinvoice,'','','','',"add",1,1); + print $form->selectDate($dateinvoice, '', '', '', '', "add", 1, 1); print ''; // Due date print ''.$langs->trans('DateMaxPayment').''; - $form->select_date($datedue,'ech','','','',"add",1,1); + print $form->selectDate($datedue, 'ech', '', '', '', "add", 1, 1); print ''; // Payment term diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index b9ae654d4ca..3fa525415bb 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2006 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2013-2018 Philippe Grand @@ -10,6 +10,7 @@ * Copyright (C) 2015 Abbes Bahfir * Copyright (C) 2015-2016 Ferran Marcet * Copyright (C) 2017 Josep Lluís Amador + * Copyright (C) 2018 Frédéric France * * 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 @@ -512,7 +513,7 @@ if ($resql) print $langs->trans('DateInvoice'); print ''; print ''; - print $form->select_date('', '', '', '', '', '', 1, 1); + print $form->selectDate('', '', '', '', '', '', 1, 1); print ''; print ''; print ''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 79bda41264e..0bcd9fd79ab 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -9,6 +9,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2018 Frédéric France * * 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 @@ -443,7 +444,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print $supplierstatic->getNomUrl(1,'supplier'); print ''; print ''.$langs->trans('Date').''; - $form->select_date($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date); + print $form->selectDate($dateinvoice,'','','','',"addpaiement",1,1,0,0,'','',$object->date); print ''; print ''.$langs->trans('PaymentMode').''; $form->select_types_paiements(empty($_POST['paiementid'])?$obj->fk_mode_reglement:$_POST['paiementid'],'paiementid'); diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index ee83bf17f00..d84ea4ae26b 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Frederic France +/* Copyright (C) 2014-2018 Alexandre Spangaro + * Copyright (C) 2015-2018 Frédéric France * * 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 @@ -200,7 +200,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0; - $form->select_date($datepayment, '', '', '', '', "add_payment", 1, 1); + print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); print ""; print '';