diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 389b835e38e..cc4dd9dbb7f 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2014-2016 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 @@ -169,12 +170,12 @@ if ($action == 'create') // Date start print '' . $langs->trans("DateStart") . ''; - print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); + print $form->selectDate(($date_start ? $date_start : ''), 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); + print $form->selectDate(($date_end ? $date_end : - 1), 'fiscalyearend'); print ''; /* @@ -225,12 +226,12 @@ if ($action == 'create') // Date start print '' . $langs->trans("DateStart") . ''; - print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print $form->selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print $form->selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); print ''; // Statut diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index b8ab8d9af9f..e3290f1e542 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,8 @@ - * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2018 Alexandre Spangaro +/* Copyright (C) 2016 Olivier Geffroy + * Copyright (C) 2016 Florian Henry + * Copyright (C) 2016-2018 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 @@ -193,9 +194,9 @@ else { $moreforfilter .= '
'; $moreforfilter .= $langs->trans('DateStart') . ': '; - $moreforfilter .= $form->select_date($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0, 1); + $moreforfilter .= $form->selectDate($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0); $moreforfilter .= $langs->trans('DateEnd') . ': '; - $moreforfilter .= $form->select_date($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0, 1); + $moreforfilter .= $form->selectDate($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0); $moreforfilter .= '
'; if (! empty($moreforfilter)) { diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index e17cefd77bb..5add04d7361 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2017 Florian Henry * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2017 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 @@ -350,7 +351,7 @@ if ($action == 'create') print ''; print '' . $langs->trans("Docdate") . ''; print ''; - print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); + print $html->selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1); print ''; print ''; @@ -432,7 +433,7 @@ if ($action == 'create') print ''; print ''; print ''; - $form->select_date($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate"); + print $form->selectDate($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate"); print ''; print ''; } else { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index ee44b52ab7d..132aa4e0afa 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2016-2017 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 @@ -465,11 +466,11 @@ if (! empty($arrayfields['t.doc_date']['checked'])) print ''; print '
'; print $langs->trans('From') . ' '; - print $form->select_date($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1); + print $form->selectDate($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1); print '
'; print '
'; print $langs->trans('to') . ' '; - print $form->select_date($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1); + print $form->selectDate($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1); print '
'; print ''; } @@ -556,11 +557,11 @@ if (! empty($arrayfields['t.date_creation']['checked'])) print ''; print '
'; print $langs->trans('From') . ' '; - print $form->select_date($search_date_creation_start, 'date_creation_start', 0, 0, 1); + print $form->selectDate($search_date_creation_start, 'date_creation_start', 0, 0, 1); print '
'; print '
'; print $langs->trans('to') . ' '; - print $form->select_date($search_date_creation_end, 'date_creation_end', 0, 0, 1); + print $form->selectDate($search_date_creation_end, 'date_creation_end', 0, 0, 1); print '
'; print ''; } @@ -570,11 +571,11 @@ if (! empty($arrayfields['t.tms']['checked'])) print ''; print '
'; print $langs->trans('From') . ' '; - print $form->select_date($search_date_modification_start, 'date_modification_start', 0, 0, 1); + print $form->selectDate($search_date_modification_start, 'date_modification_start', 0, 0, 1); print '
'; print '
'; print $langs->trans('to') . ' '; - print $form->select_date($search_date_modification_end, 'date_modification_end', 0, 0, 1); + print $form->selectDate($search_date_modification_end, 'date_modification_end', 0, 0, 1); print '
'; print ''; } diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 55e9c8ab7ad..c5726901e2e 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2013-2018 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 @@ -287,10 +288,10 @@ print ''; print ''; print ''; print $langs->trans('From') . ': '; -print $form->select_date($search_date_start, 'search_date_start', 0, 0, 1); +print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1); print '
'; print $langs->trans('to') . ': '; -print $form->select_date($search_date_end, 'search_date_end', 0, 0, 1); +print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1); print ''; print ''; print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index e5741e940a6..7cd98743480 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -7,7 +7,7 @@ * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2017 Frédéric France + * Copyright (C) 2017-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 @@ -852,7 +852,8 @@ if (empty($action) || $action == 'view') { $description.= $langs->trans("DescJournalOnlyBindedVisible").'
'; $listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger")); - $period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); + $period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0); + $period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); $varlink = 'id_journal=' . $id_journal; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 07982f107fd..c39a750af1a 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -6,6 +6,7 @@ * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 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 @@ -534,7 +535,8 @@ if (empty($action) || $action == 'view') { $description.= $langs->trans("DescJournalOnlyBindedVisible").'
'; $listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger")); - $period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); + $period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0); + $period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); $varlink = 'id_journal=' . $id_journal; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 14501ae9b82..d8be52cef90 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -6,6 +6,7 @@ * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 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 @@ -726,7 +727,8 @@ if (empty($action) || $action == 'view') { } $listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger")); - $period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); + $period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0); + $period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); $varlink = 'id_journal=' . $id_journal; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index a53d4698500..8e44d1a2c10 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -8,6 +8,7 @@ * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2014 Raphaël Doursenaud + * 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 @@ -656,7 +657,8 @@ if (empty($action) || $action == 'view') { $description .= $langs->trans("DepositsAreIncluded"); $listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger")); - $period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); + $period = $form->selectDate($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0) . ' - ' . $form->selectDate($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0); + $period .= ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1); $varlink = 'id_journal=' . $id_journal; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index d7060124ee4..3d3c8fb6e54 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1,11 +1,12 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2018 Regis Houssin - * Copyright (C) 2012 Marcos García - * Copyright (C) 2012-2018 Philippe Grand - * Copyright (C) 2015-2016 Alexandre Spangaro +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2018 Regis Houssin + * Copyright (C) 2012 Marcos García + * Copyright (C) 2012-2018 Philippe Grand + * Copyright (C) 2015-2016 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 @@ -980,7 +981,7 @@ else // Birthday print "".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "\n"; // Public profil @@ -1218,7 +1219,7 @@ else // Birthday print "".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "\n"; // Public profil diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 6312bc8494b..78a7ce8495f 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1,9 +1,10 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2012-2017 Regis Houssin - * Copyright (C) 2015-2016 Alexandre Spangaro +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2004-2018 Laurent Destailleur + * Copyright (C) 2012-2017 Regis Houssin + * Copyright (C) 2015-2016 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 @@ -895,7 +896,7 @@ if ($rowid > 0) $datefrom=dol_time_plus_duree($object->datefin,1,'d'); } } - print $form->select_date($datefrom,'','','','',"subscription",1,1,1); + print $form->selectDate($datefrom, '', '', '', '', "subscription", 1, 1); print ""; // Date end subscription @@ -908,7 +909,7 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print ''.$langs->trans("DateEndSubscription").''; - print $form->select_date($dateto,'end','','','',"subscription",1,0,1); + print $form->selectDate($dateto, 'end', '', '', '', "subscription", 1, 0); print ""; if ($adht->subscription) @@ -1009,7 +1010,7 @@ if ($rowid > 0) // Date of payment print ''.$langs->trans("DatePayment").''; - print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'subscription',1,1,1); + print $form->selectDate(isset($paymentdate)?$paymentdate:-1, 'payment', 0, 0, 1, 'subscription', 1, 1); print "\n"; print ''.$langs->trans('Numero'); diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 0bacc8cf863..94950f02b05 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2007-2012 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 @@ -209,13 +210,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Date start subscription print ''.$langs->trans("DateSubscription").''; - $form->select_date($object->dateh,'datesub',1,1,0,'update',1); + print $form->selectDate($object->dateh, 'datesub', 1, 1, 0, 'update', 1); print ''; print ''; // Date end subscription print ''.$langs->trans("DateEndSubscription").''; - $form->select_date($object->datef,'datesubend',0,0,0,'update',1); + print $form->selectDate($object->datef, 'datesubend', 0, 0, 0, 'update', 1); print ''; print ''; diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index d49d25b76b6..7b2baf0ed94 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -1,7 +1,8 @@ - * Copyright (C) 2017 ATM Consulting - * Copyright (C) 2017 Pierre-Henry Favre +/* Copyright (C) 2012 Mikael Carlavan + * Copyright (C) 2017 ATM Consulting + * Copyright (C) 2017 Pierre-Henry Favre + * 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 @@ -182,8 +183,8 @@ if ($action != 'edit') echo ''.$form->selectExpense('', 'fk_c_type_fees', 0, 1, 1).''; echo ''.$form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0).''; - echo ''.$form->select_date(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0, 1).''; - echo ''.$form->select_date(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0, 1).''; + echo ''.$form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0).''; + echo ''.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0).''; echo ''.$conf->currency.''; echo ''.$form->selectyesno('restrictive', 0, 1).''; echo ''; @@ -270,7 +271,7 @@ foreach ($rules as $rule) echo ''; if ($action == 'edit' && $object->id == $rule->id) { - echo $form->select_date(strtotime(date('Y-m-d', $object->dates)), 'start', '', '', 0, '', 1, 0, 1); + print $form->selectDate(strtotime(date('Y-m-d', $object->dates)), 'start', '', '', 0, '', 1, 0); } else { @@ -282,7 +283,7 @@ foreach ($rules as $rule) echo ''; if ($action == 'edit' && $object->id == $rule->id) { - echo $form->select_date(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0, 1); + print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0); } else { diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 1f5ecb4723e..9afe7c5fcb3 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Bahfir Abbes + * 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 @@ -235,7 +236,7 @@ if ($result) // Lignes des champs de filtres print ''; - print ''.$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).''; + print ''.$form->selectDate($date_start,'date_start',0,0,0,'',1,0).$form->selectDate($date_end,'date_end',0,0,0,'',1,0).''; print ''; print ''; diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 3fd68b836f3..cd558c020a6 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -1,6 +1,7 @@ - * Copyright (C) 2017-2018 Laurent Destailleur +/* Copyright (C) 2017 ATM Consulting + * Copyright (C) 2017-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 @@ -372,10 +373,10 @@ print ' '; print ''; //print $langs->trans("from").': '; -$form->select_date($search_start,'search_start'); +print $form->selectDate($search_start,'search_start'); //print '
'; //print $langs->trans("to").': '; -$form->select_date($search_end,'search_end'); +print $form->selectDate($search_end,'search_end'); print ''; // User diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 880eb77b8af..4ddafd17c44 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -3,6 +3,7 @@ * Copyright (C) 2011 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2015 Regis Houssin + * 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 @@ -202,7 +203,7 @@ $langs->loadLangs(array("main","bills","cashdesk")); " onclick="javascript: verifClic('DIF');" /> trans("DateDue").' :'; - print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); + print $form->selectDate(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0); print ''; ?> diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index dfdc920453d..8fd1f1b0030 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -6,7 +6,8 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Cedric GROSS - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 @@ -689,9 +690,13 @@ if ($action == 'create') $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print ''.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) { + print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldayend'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } else { + print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart'); + } print ''; // Date end @@ -702,12 +707,17 @@ if ($action == 'create') $datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); } print ''.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } else { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } print ''; - $userepeatevent=($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); // Dev in progress + // Dev in progress + $userepeatevent=($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); if ($userepeatevent) { // Repeat @@ -1057,30 +1067,38 @@ if ($id > 0) // Date start print ''.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) { + print $form->selectDate($datep?$datep:$object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datep?$datep:$object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart'); + } else { + print $form->selectDate($datep?$datep:$object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart'); + } print ''; // Date end print ''.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - //else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); - else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef?$datef:$object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } elseif (GETPOST("afaire") == 2) { + print $form->selectDate($datef?$datef:$object->datef,'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } else { + print $form->selectDate($datef?$datef:$object->datef,'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); + } print ''; - $userepeatevent=($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); // Dev in progress + // Dev in progress + $userepeatevent=($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); if ($userepeatevent) { // Repeat print ''.$langs->trans("RepeatEvent").''; print ''; - $arrayrecurrulefreq=array( - 'no'=>$langs->trans("No"), - 'MONTHLY'=>$langs->trans("EveryMonth"), - 'WEEKLY'=>$langs->trans("EveryWeek"), - //'DAYLY'=>$langs->trans("EveryDay") - ); + $arrayrecurrulefreq = array( + 'no'=>$langs->trans("No"), + 'MONTHLY'=>$langs->trans("EveryMonth"), + 'WEEKLY'=>$langs->trans("EveryWeek"), + //'DAYLY'=>$langs->trans("EveryDay"), + ); $selectedrecurrulefreq='no'; $selectedrecurrulebymonthday=''; $selectedrecurrulebyday=''; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 319499d65fd..5628e65c6d9 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Open-DSI + * 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 @@ -189,9 +190,9 @@ $form=new Form($db); $userstatic=new User($db); $formactions=new FormActions($db); -$nav=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); -$nav.=' '; +$nav = ''; +$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); +$nav .=' '; $now=dol_now(); @@ -438,15 +439,17 @@ if ($resql) if (! empty($arrayfields['a.label']['checked'])) print ''; if (! empty($arrayfields['a.datep']['checked'])) { print ''; - print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); + print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0); print ''; } if (! empty($arrayfields['a.datep2']['checked'])) { print ''; - print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); + print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0); print ''; } - if (! empty($arrayfields['s.nom']['checked'])) print ''; + if (! empty($arrayfields['s.nom']['checked'])) { + print ''; + } if (! empty($arrayfields['a.fk_contact']['checked'])) print ''; if (! empty($arrayfields['a.fk_element']['checked'])) print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 9350de8f85c..31f22420cb8 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS + * 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 @@ -262,7 +263,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 58690dc512b..7b02857becf 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS + * 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 @@ -276,7 +277,7 @@ $nav.=''; $nav.=''; $nav.=''; */ -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); $nav.=' '; //$nav.=''; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 2be1aea8928..30fa8d74a8d 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo @@ -12,6 +12,7 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Ferran Marcet * 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 @@ -1495,7 +1496,7 @@ if ($action == 'create') // Date print '' . $langs->trans('Date') . ''; - $form->select_date('', '', '', '', '', "addprop", 1, 1); + print $form->selectDate('', '', '', '', '', "addprop", 1, 1); print ''; // Validaty duration @@ -1543,9 +1544,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); + print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); } else { - $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); + print $form->selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print ''; @@ -1929,7 +1930,7 @@ if ($action == 'create') print '
'; print ''; print ''; - $form->select_date($object->date, 're', '', '', 0, "editdate"); + print $form->selectDate($object->date, 're', '', '', 0, "editdate"); print ''; print '
'; } else { @@ -1955,7 +1956,7 @@ if ($action == 'create') print '
'; print ''; print ''; - $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); + print $form->selectDate($object->fin_validite, 'ech', '', '', '', "editecheance"); print ''; print '
'; } else { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index e1219d5b2d5..0dd266ef186 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -12,6 +12,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry + * 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 @@ -1579,7 +1580,7 @@ if ($action == 'create' && $user->rights->commande->creer) } // Date print '' . $langs->trans('Date') . ''; - $form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date + print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; // Delivery date planed @@ -1589,7 +1590,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:''; } - $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); + print $form->selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print ""; // Conditions de reglement @@ -2086,7 +2087,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; print ''; print ''; - $form->select_date($object->date, 'order_', '', '', '', "setdate"); + print $form->selectDate($object->date, 'order_', '', '', '', "setdate"); print ''; print '
'; } else { @@ -2111,7 +2112,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; print ''; print ''; - $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); print ''; print '
'; } else { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 2ed616c90a0..558d8186a86 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1,15 +1,15 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Frederic France - * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016 Ferran Marcet +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015-2018 Frédéric France + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -487,7 +487,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/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 37768ade393..3335cf93276 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -1,12 +1,13 @@ - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Andreu Bisquerra Gaya - * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2018 Juanjo Menent - * Copyright (C) 2015 Ferran Marcet +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Andreu Bisquerra Gaya + * Copyright (C) 2012 David Rodriguez Martinez + * Copyright (C) 2012-2018 Juanjo Menent + * Copyright (C) 2015 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 @@ -442,7 +443,7 @@ if ($action == 'create' && !$error) // Date invoice print ''.$langs->trans('Date').''; - $html->select_date('','','','','',"add",1,1); + print $html->selectDate('', '', '', '', '', "add", 1, 1); print ''; // Payment term print ''.$langs->trans('PaymentConditionsShort').''; @@ -596,8 +597,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); - $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); + $period=$html->selectDate($date_start,'date_start',0,0,1,'',1,0).' - '.$html->selectDate($date_end,'date_end',0,0,1,'',1,0); + $periodely=$html->selectDate($date_starty,'date_start_dely',0,0,1,'',1,0).' - '.$html->selectDate($date_endy,'date_end_dely',0,0,1,'',1,0); if (! empty($socid)) { @@ -654,7 +655,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; print '
'; - + $generic_commande = new Commande($db); while ($i < $num) 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 7dcc613961d..b58619b66a2 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/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 3eee0239144..33757c67c6a 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -1,5 +1,6 @@ +/* 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 @@ -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 ''; // Label diff --git a/htdocs/compta/bank/various_payment/index.php b/htdocs/compta/bank/various_payment/index.php index 6e4060bbeb1..7e3f921b67f 100644 --- a/htdocs/compta/bank/various_payment/index.php +++ b/htdocs/compta/bank/various_payment/index.php @@ -1,6 +1,7 @@ - * Copyright (C) 2017 Laurent Destailleur +/* Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 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 @@ -189,7 +190,7 @@ if ($result) // Date print ''; print '
'; - print $form->select_date($search_date, 'date_doc', 0, 0, 1); + print $form->selectDate($search_date, 'date_doc', 0, 0, 1); 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/facture/card.php b/htdocs/compta/facture/card.php index 27b3fae010e..a40ad636976 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1,19 +1,20 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2015 Juanjo Menent - * Copyright (C) 2012-2013 Christophe Battarel - * Copyright (C) 2012-2013 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud - * Copyright (C) 2013 Jean-Francois FERRY - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2014-2018 Ferran Marcet - * Copyright (C) 2015-2016 Marcos García +/* Copyright (C) 2002-2006 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2015 Juanjo Menent + * Copyright (C) 2012-2013 Christophe Battarel + * Copyright (C) 2012-2013 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2013 Jean-Francois FERRY + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2014-2018 Ferran Marcet + * Copyright (C) 2015-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 @@ -3072,7 +3073,7 @@ if ($action == 'create') // Date invoice print '' . $langs->trans('DateInvoice') . ''; - print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); + print $form->selectDate($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1); print ''; // Date point of tax @@ -3080,7 +3081,7 @@ if ($action == 'create') { print '' . $langs->trans('DatePointOfTax') . ''; $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); - print $form->select_date($date_pointoftax?$date_pointoftax:-1, 'date_pointoftax', '', '', '', "add", 1, 1, 1); + print $form->selectDate($date_pointoftax?$date_pointoftax:-1, 'date_pointoftax', '', '', '', "add", 1, 1); print ''; } diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 00dd78ca1bd..3fa091e0665 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1,14 +1,14 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2016 Meziane Sof - * Copyright (C) 2017 Frédéric France +/* Copyright (C) 2002-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2016 Meziane Sof + * Copyright (C) 2017-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 @@ -1113,7 +1113,7 @@ if ($action == 'create') // Date next run print "".$langs->trans('NextDateToExecution').""; $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); + print $form->selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1); print ""; // Number max of generation diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 6196d08f741..2d43d48d778 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -1,10 +1,11 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011-2014 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2011-2012 Alexandre spangaro - * Copyright (C) 2013 Marcos García +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2011-2012 Alexandre spangaro + * Copyright (C) 2013 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 @@ -80,7 +81,8 @@ $date_end=dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); + $date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); + $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); } $name=$langs->trans("PurchasesJournal"); @@ -90,7 +92,7 @@ $builddate=dol_now(); $description=$langs->trans("DescPurchasesJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$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); report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 8a2d5080a30..3b4be22a81d 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -1,12 +1,13 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011-2014 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2011-2012 Alexandre Spangaro - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2013 Marcos García - * Copyright (C) 2014 Raphaël Doursenaud +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2011-2012 Alexandre Spangaro + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2013 Marcos García + * Copyright (C) 2014 Raphaël Doursenaud + * 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 @@ -93,7 +94,7 @@ $builddate=dol_now(); $description=$langs->trans("DescSellsJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$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); report_header($name,'',$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); 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/paiement.php b/htdocs/compta/paiement.php index c2ce95dd827..764ca818f7f 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -1,13 +1,14 @@ - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2014 Raphaël Doursenaud - * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> - * Copyright (C) 2015 Juanjo Menent +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2014 Raphaël Doursenaud + * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> + * Copyright (C) 2015 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 @@ -467,7 +468,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('Date').''; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment); - $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); + print $form->selectDate($datepayment, '', '', '', 0, "add_paiement", 1, 1, 0, '', '', $facture->date); print ''; // Payment mode diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 647cdadaf04..1f7b344f62d 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -5,6 +5,7 @@ * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2015-2016 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 @@ -386,7 +387,7 @@ if ($action == 'new') //print ''.$langs->trans('Date').''.dol_print_date($now,'day').''; // Filter print ''.$langs->trans("DateChequeReceived").''; - print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1); + print $form->selectDate($filterdate, 'fd', 0, 0, 1, '', 1, 1); print ''; print ''.$langs->trans("BankAccount").''; $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); @@ -586,7 +587,7 @@ else print ''; print ''; print ''; - $form->select_date($object->date_bordereau,'datecreate_','','','',"setdate"); + print $form->selectDate($object->date_bordereau, 'datecreate_', '', '', '', "setdate"); print ''; print ''; } diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index fba8723d818..9b605e68929 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016 Frédéric France +/* Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2016-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 @@ -17,9 +17,9 @@ */ /** - * \file htdocs/compta/paiement_charge.php - * \ingroup tax - * \brief Page to add payment of a tax + * \file htdocs/compta/paiement_charge.php + * \ingroup tax + * \brief Page to add payment of a tax */ require '../main.inc.php'; @@ -226,7 +226,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $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 ''; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 18ba0433d98..60e471d712d 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -1,7 +1,8 @@ - * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2010-2016 Juanjo Menent +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2010-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 @@ -240,7 +241,7 @@ if ($id > 0 || $ref) print ''; print ''.$langs->trans("NotifyTransmision").''; print ''.$langs->trans("TransData").''; - print $form->select_date('','','','','',"userfile",1,1); + print $form->selectDate('', '', '', '', '', "userfile", 1, 1); print ''; print ''.$langs->trans("TransMetod").''; print $form->selectarray("methode",$object->methodes_trans); @@ -264,7 +265,7 @@ if ($id > 0 || $ref) print ''; print ''.$langs->trans("NotifyCredit").''; print ''.$langs->trans('CreditDate').''; - print $form->select_date('','','','','',"infocredit",1,1); + print $form->selectDate('', '', '', '', '', "infocredit", 1, 1); print ''; print ''; print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index b08e2c3662e..0d07c341458 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -1,9 +1,10 @@ - * Copyright (C) 2010-2015 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2012 Juanjo Menent - * Copyright (C) 2018 Nicolas ZABOURI +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2010-2015 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2018 Nicolas ZABOURI + * 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 @@ -153,7 +154,7 @@ print '' if ($nb) { if ($pricetowithdraw) { print $langs->trans('ExecutionDate').' '; - print $form->select_date(); + print $form->selectDate(); if ($mysoc->isInEEC()) { print ''; print ''; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index a1aaa932b5b..8dd1c87069a 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -1,8 +1,9 @@ - * Copyright (C) 2005-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2013 Juanjo Menent +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2012 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2013 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 @@ -196,7 +197,7 @@ if ($id) //Date print ''.$langs->trans("RefusedData").''; print ''; - print $form->select_date('','','','','',"confirm_rejet"); + print $form->selectDate('', '', '', '', '', "confirm_rejet"); print ''; //Reason diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index b30e65310b3..4d643536388 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -1,12 +1,13 @@ - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Dourseanud - * Copyright (C) 2014-2106 Ferran Marcet - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Florian Henry +/* Copyright (C) 2002-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Dourseanud + * Copyright (C) 2014-2106 Ferran Marcet + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 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 @@ -161,7 +162,7 @@ if ($modecompta=="CREANCES-DETTES") $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesResultDue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -175,9 +176,8 @@ elseif ($modecompta=="RECETTES-DEPENSES") $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); - $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); - $periodlink=($year_start?"".img_previous()." ".img_next()."":""); + $period=$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); + $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesResultInOut"); $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); @@ -188,8 +188,7 @@ elseif ($modecompta=="BOOKKEEPING") $calcmode=$langs->trans("CalcModeBookkeeping"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); - $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); $arraylist=array('no'=>$langs->trans("No"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All")); $period.='     '.$langs->trans("DetailByAccount").' '. $form->selectarray('showaccountdetail', $arraylist, $showaccountdetail, 0); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 1bfd767ef19..5fc58955b60 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014-2016 Ferran Marcet - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Florian Henry +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014-2016 Ferran Marcet + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 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 @@ -124,7 +125,7 @@ if ($modecompta == 'CREANCES-DETTES') $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesAmountWithTaxIncluded"); $description.='
'.$langs->trans("RulesResultDue"); @@ -138,7 +139,7 @@ else if ($modecompta=="RECETTES-DEPENSES") { $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesAmountWithTaxIncluded"); $description.='
'.$langs->trans("RulesResultInOut"); @@ -151,7 +152,7 @@ else if ($modecompta=="BOOKKEEPING") $calcmode=$langs->trans("CalcModeBookkeeping"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesAmountOnInOutBookkeepingRecord"); $description.=' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->trans("Chartofaccounts")).')'; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 87127fdb4cf..c4a6e2ec755 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -1,7 +1,8 @@ - * Copyright (C) 2016 Alexandre Spangaro - * Copyright (C) 2018 Laurent Destailleur +/* Copyright (C) 2016-2017 Jamal Elbaz + * Copyright (C) 2016 Alexandre Spangaro + * 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 @@ -171,7 +172,7 @@ if ($modecompta=="CREANCES-DETTES") $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesResultDue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -179,25 +180,24 @@ if ($modecompta=="CREANCES-DETTES") $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="RECETTES-DEPENSES") { +elseif ($modecompta=="RECETTES-DEPENSES") { $name=$langs->trans("AnnualByAccountInputOutputMode"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; if (! empty($conf->accounting->enabled)) $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); - $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); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesResultInOut"); $builddate=dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPersonalizedAccountGroups"); $calcmode=$langs->trans("CalcModeBookkeeping"); //$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $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); $arraylist=array('no'=>$langs->trans("No"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All")); $period.='     '.$langs->trans("DetailByAccount").' '. $form->selectarray('showaccountdetail', $arraylist, $showaccountdetail, 0); $periodlink = $textprevyear . $textnextyear ; @@ -247,12 +247,12 @@ if ($modecompta == 'CREANCES-DETTES') //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } -else if ($modecompta=="RECETTES-DEPENSES") +elseif ($modecompta=="RECETTES-DEPENSES") { //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } -else if ($modecompta=="BOOKKEEPING") +elseif ($modecompta=="BOOKKEEPING") { // Get array of all report groups that are active diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 282f9626491..f50d940a51a 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/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 7f5caa13031..4ffa1a2829f 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -1,8 +1,8 @@ - * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2016 Frédéric France - * Copyright (C) 2017 Alexandre Spangaro +/* Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2016-2018 Frédéric France + * Copyright (C) 2017 Alexandre Spangaro * * 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 @@ -332,7 +332,7 @@ if ($action == 'create') print $form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")); print ''; print ''; - print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); + print $form->selectDate(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); print ''; print ''; @@ -342,7 +342,7 @@ if ($action == 'create') print $langs->trans("DateDue"); print ''; print ''; - print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print $form->selectDate(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); print ''; print "\n"; @@ -502,7 +502,7 @@ if ($id > 0) print ""; if ($action == 'edit') { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -514,10 +514,9 @@ if ($id > 0) if ($action == 'edit') { print ''.$langs->trans("DateDue").""; - print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print $form->selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print ""; - } - else { + } else { print "".$langs->trans("DateDue")."".dol_print_date($object->date_ech,'day').""; } diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 74ec0bfe4ae..5c9366037ed 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -1,5 +1,6 @@ +/* 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 @@ -152,7 +153,7 @@ 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); +$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--; @@ -230,7 +231,7 @@ else if ($modecompta=="BOOKKEEPINGCOLLECTED") } -$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 ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; else $periodlink = ''; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 712bb950bb2..e7a3d4da480 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -1,7 +1,8 @@ - * Copyright (C) 2013-2016 Laurent Destailleur - * Copyright (C) 2015 Raphaël Doursenaud +/* Copyright (C) 2013 Antoine Iauch + * Copyright (C) 2013-2016 Laurent Destailleur + * Copyright (C) 2015 Raphaël Doursenaud + * 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 @@ -199,7 +200,7 @@ else if ($modecompta=="BOOKKEEPINGCOLLECTED") } -$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 ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; else $periodlink = ''; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 72dfd3a5637..4f49b9492ff 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Antoine Iauch +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Antoine Iauch + * 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 @@ -177,7 +178,7 @@ else if ($modecompta=="BOOKKEEPINGCOLLECTED") } -$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 ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; else $periodlink = ''; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index af6bd7fc625..309737111f5 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -5,6 +5,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Antoine Iauch * Copyright (C) 2015 Raphaël Doursenaud + * 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 @@ -203,7 +204,7 @@ else if ($modecompta=="BOOKKEEPINGCOLLECTED") } -$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 ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink=''.img_previous().' '.img_next().''; else $periodlink = ''; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 38df153a560..c5ceccdad61 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2017 Olivier Geffroy +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2017 Olivier Geffroy + * 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 @@ -119,7 +120,7 @@ if ($modecompta=="CREANCES-DETTES") $calcmode=$langs->trans("CalcModeDebt"); //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -133,7 +134,7 @@ else if ($modecompta=="RECETTES-DEPENSES") $calcmode=$langs->trans("CalcModeEngagement"); //$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; //$calcmode.='
('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); @@ -146,7 +147,7 @@ else if ($modecompta=="BOOKKEEPING") $calcmode=$langs->trans("CalcModeBookkeeping"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $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); $periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesCATotalSaleJournal"); $builddate=dol_now(); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 4480682b091..69483d84be0 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015-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 @@ -255,11 +256,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 diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index ae95d71ca9c..74a08d0d142 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -3,7 +3,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2006 Yannick Warnier - * Copyright (C) 2014 Ferran Marcet + * 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 @@ -136,18 +137,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++; } $builddate=dol_now(); diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 7c4912411f6..8e4fccf4168 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * 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 @@ -217,7 +218,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { } 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/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index e2c7cc5d793..ff3e3ce127d 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2006-2007, 2015 Yannick Warnier - * Copyright (C) 2014 Ferran Marcet +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2006-2015 Yannick Warnier + * 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 @@ -135,18 +136,21 @@ 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); +$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(); diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 52957d25343..9e1757fdc5a 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1,13 +1,14 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin - * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry +/* Copyright (C) 2004-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * 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 @@ -704,11 +705,11 @@ else $form=new Form($db); if ($object->birthday) { - print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); + print $form->selectDate($object->birthday, 'birthday', 0, 0, 0, "perso", 1, 0); } else { - print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1); + print $form->selectDate('', 'birthday', 0, 0, 1, "perso", 1, 0); } print ''; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 3e5ec085132..4932d549df4 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -1,7 +1,8 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * 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 @@ -199,7 +200,7 @@ if ($action == 'edit') // Date To Birth print ''.$langs->trans("DateToBirth").''; $form=new Form($db); - print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); + print $form->selectDate($object->birthday, 'birthday', 0, 0, 1, "perso", 1,0); print ''; print ''.$langs->trans("Alert").': '; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 9c13a57112a..0e0b0ee44f1 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1,14 +1,15 @@ - * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2014 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2017 Juanjo Menent +/* Copyright (C) 2003-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2017 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014-2018 Ferran Marcet * Copyright (C) 2014-2016 Marcos García - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry + * 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 @@ -1242,7 +1243,7 @@ if ($action == 'create') print ''; print ''.$langs->trans("Date").''; - $form->select_date($datecontrat,'',0,0,'',"contrat"); + print $form->selectDate($datecontrat, '', 0, 0, '', "contrat"); print ""; // Project @@ -1781,9 +1782,9 @@ else print ''; print ''; print $langs->trans("DateStartPlanned").' '; - $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); + print $form->selectDate($db->jdate($objp->date_debut), "date_start_update", $usehm, $usehm, ($db->jdate($objp->date_debut)>0?0:1), "update"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); + print $form->selectDate($db->jdate($objp->date_fin), "date_end_update", $usehm, $usehm, ($db->jdate($objp->date_fin)>0?0:1), "update"); print ''; print ''; @@ -1966,10 +1967,10 @@ else print ''; print ''.$langs->trans("DateServiceActivate").''; - print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); + print $form->selectDate($dateactstart, '', $usehm, $usehm, '', "active", 1, 0); print ''; print ''.$langs->trans("DateEndPlanned").''; - print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); + print $form->selectDate($dateactend, "end", $usehm, $usehm, '', "active", 1, 0); print ''; print ''; print ''; @@ -2027,7 +2028,7 @@ else if ($objp->statut == 4) { print $langs->trans("DateEndReal").' '; - print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); + print $form->selectDate($dateactend, "end", $usehm, $usehm, ($objp->date_fin_reelle>0?0:1), "closeline", 1, 1); } } print ''; diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 114490fa373..72b45f49db5 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018 Ferran Marcet +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry + * 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 @@ -455,7 +456,7 @@ if (! empty($arrayfields['cd.date_ouverture_prevue']['checked'])) print $form->selectarray('filter_opouvertureprevue',$arrayofoperators,$filter_opouvertureprevue,1); print ' '; $filter_dateouvertureprevue=dol_mktime(0,0,0,$opouvertureprevuemonth,$opouvertureprevueday,$opouvertureprevueyear); - print $form->select_date($filter_dateouvertureprevue,'opouvertureprevue',0,0,1,'',1,0,1); + print $form->selectDate($filter_dateouvertureprevue, 'opouvertureprevue', 0, 0, 1, '', 1, 0); print ''; } if (! empty($arrayfields['cd.date_ouverture']['checked'])) @@ -465,7 +466,7 @@ if (! empty($arrayfields['cd.date_ouverture']['checked'])) print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1); print ' '; $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); - print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1); + print $form->selectDate($filter_date1, 'op1', 0, 0, 1, '', 1, 0); print ''; } if (! empty($arrayfields['cd.date_fin_validite']['checked'])) @@ -475,7 +476,7 @@ if (! empty($arrayfields['cd.date_fin_validite']['checked'])) print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1); print ' '; $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); - print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); + print $form->selectDate($filter_date2, 'op2', 0, 0, 1, '', 1, 0); print ''; } if (! empty($arrayfields['cd.date_cloture']['checked'])) @@ -485,7 +486,7 @@ if (! empty($arrayfields['cd.date_cloture']['checked'])) print $form->selectarray('filter_opcloture',$arrayofoperators,$filter_opcloture,1); print ' '; $filter_date_cloture=dol_mktime(0,0,0,$opcloturemonth,$opclotureday,$opclotureyear); - print $form->select_date($filter_date_cloture,'opcloture',0,0,1,'',1,0,1); + print $form->selectDate($filter_date_cloture, 'opcloture', 0, 0, 1, '', 1, 0); print ''; } // Extra fields diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5aa9af34146..7991bbb9ae9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -12,7 +12,7 @@ * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2018 Frederic France + * Copyright (C) 2018 Frédéric France * Copyright (C) 2018 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify @@ -5325,11 +5325,11 @@ abstract class CommonObject $showtime = in_array($type,array('datetime')) ? 1 : 0; - // Do not show current date when field not required (see select_date() method) + // Do not show current date when field not required (see selectDate() method) if (!$required && $value == '') $value = '-1'; // TODO Must also support $moreparam - $out = $form->select_date($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 1, 0, 1); + $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 1, 0); } elseif (in_array($type,array('int','integer'))) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 3ba5dc0664f..c86bd3eff3f 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -997,11 +997,11 @@ class ExtraFields $showtime = in_array($type,array('datetime')) ? 1 : 0; - // Do not show current date when field not required (see select_date() method) + // Do not show current date when field not required (see selectDate() method) if (!$required && $value == '') $value = '-1'; // TODO Must also support $moreparam - $out = $form->select_date($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 1, 0, 1); + $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 1, 0); } elseif (in_array($type,array('int','integer'))) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f8f1efb70a7..177b05850ed 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -17,6 +17,7 @@ * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 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 @@ -210,11 +211,11 @@ class Form } else if ($typeofdata == 'day' || $typeofdata == 'datepicker') { - $ret.=$this->select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1); + $ret.=$this->selectDate($value,$htmlname,0,0,1,'form'.$htmlname,1,0); } else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { - $ret.=$this->select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1); + $ret.=$this->selectDate($value,$htmlname,1,1,1,'form'.$htmlname,1,0); } else if (preg_match('/^select;/',$typeofdata)) { @@ -3807,7 +3808,7 @@ class Form { $more.=''.$input['label'].''; $more.=''; - $more.=$this->select_date($input['value'],$input['name'],0,0,0,'',1,0,1); + $more.=$this->selectDate($input['value'],$input['name'],0,0,0,'',1,0); $more.=''."\n"; $formquestion[] = array('name'=>$input['name'].'day'); $formquestion[] = array('name'=>$input['name'].'month'); @@ -4170,7 +4171,7 @@ class Form * @param int $displaymin Display minutes selector * @param int $nooutput 1=No print output, return string * @return string - * @see select_date + * @see selectDate */ function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) { @@ -4186,7 +4187,7 @@ class Form $ret.=''; $ret.=''; $ret.=''; $ret.=''; $ret.='
'; - $ret.=$this->select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1); + $ret.=$this->selectDate($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0); $ret.='
'; @@ -4907,8 +4908,8 @@ class Form // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps - /** - * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Fields are preselected with : * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) @@ -4927,19 +4928,53 @@ class Form * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. - * @return string|null Nothing or string if nooutput is 1 - * @see form_date, select_month, select_year, select_dayofweek + * @return string|null Nothing or string if nooutput is 1 + * @deprecated + * @see form_date, select_month, select_year, select_dayofweek */ - function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') - { + function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + { // phpcs:enable + $retstring = $this->selectDate($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $disabled=0, $fullday='', $addplusone='', $adddateof=''); + if (! empty($nooutput)) { + return $retstring; + } + + print $retstring; + return; + } + + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + * Fields are preselected with : + * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') + * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) + * - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1) + * + * @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). + * @param string $prefix Prefix for fields name + * @param int $h 1 or 2=Show also hours (2=hours on a new line), -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show hour always empty + * @param int $m 1=Show also minutes, -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show minutes always empty + * @param int $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only + * @param string $form_name Not used + * @param int $d 1=Show days, month, years + * @param int $addnowlink Add a link "Now" + * @param int $disabled Disable input fields + * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 + * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. + * @param datetime $adddateof Add a link "Date of invoice" using the following date. + * @return string Html for selectDate + * @see form_date, select_month, select_year, select_dayofweek + */ + function selectDate($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + { global $conf,$langs; $retstring=''; - if($prefix=='') $prefix='re'; - if($h == '') $h=0; - if($m == '') $m=0; + if ($prefix=='') $prefix='re'; + if ($h == '') $h=0; + if ($m == '') $m=0; $emptydate=0; $emptyhours=0; if ($empty == 1) { $emptydate=1; $emptyhours=1; } @@ -5277,10 +5312,7 @@ class Form $retstring.=' -