dolibarr 21.0.3
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2019-2023 Open-DSI <support@open-dsi.fr>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require '../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
32require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
33
42// Load translation files required by the page
43$langs->loadLangs(array("accountancy", "bills", "compta", "exports", "other"));
44
45$action = GETPOST('action', 'aZ09');
46$confirm = GETPOST('confirm', 'aZ09');
47$fiscal_period_id = GETPOSTINT('fiscal_period_id');
48$validatemonth = GETPOSTINT('validatemonth');
49$validateyear = GETPOSTINT('validateyear');
50
51// Security check
52if (!isModEnabled('accounting')) {
54}
55if ($user->socid > 0) {
57}
58if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
60}
61
62// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
63$hookmanager->initHooks(array('accountancyclosure'));
64
65$object = new BookKeeping($db);
66
67$now = dol_now();
68$fiscal_periods = $object->getFiscalPeriods();
69if (!is_array($fiscal_periods)) {
70 setEventMessages($object->error, $object->errors, 'errors');
71}
72
73// Define the arrays of fiscal periods
74$active_fiscal_periods = array();
75$first_active_fiscal_period = null;
76$last_fiscal_period = null;
77$current_fiscal_period = null;
78$next_fiscal_period = null;
79$next_active_fiscal_period = null;
80if (is_array($fiscal_periods)) {
81 foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start
82 if (empty($first_active_fiscal_period) && empty($fiscal_period['status'])) {
83 $first_active_fiscal_period = $fiscal_period;
84 }
85 if (empty($fiscal_period['status'])) { // if not closed
86 $active_fiscal_periods[] = $fiscal_period;
87 }
88 if (isset($current_fiscal_period)) { // If we already reach then current fiscal period, then this one is the next one just after
89 if (!isset($next_fiscal_period)) {
90 $next_fiscal_period = $fiscal_period;
91 }
92 if (!isset($next_active_fiscal_period) && empty($fiscal_period['status'])) {
93 $next_active_fiscal_period = $fiscal_period;
94 }
95 } else { // If we did not found the current fiscal period
96 if ($fiscal_period_id == $fiscal_period['id'] || (empty($fiscal_period_id) && $fiscal_period['date_start'] <= $now && $now <= $fiscal_period['date_end'])) {
97 $current_fiscal_period = $fiscal_period;
98 } else {
99 $last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period
100 }
101 }
102 }
103}
104
105// If a current fiscal period open with an end and start date was not found, we autoselect the first one that is open and has a start and end date defined
106if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) {
107 $current_fiscal_period = $first_active_fiscal_period;
108 $last_fiscal_period = null;
109 $foundcurrent = false;
110 foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start
111 if ($foundcurrent) {
112 $next_fiscal_period = $fiscal_period;
113 break;
114 }
115 if ($fiscal_period['id'] == $current_fiscal_period['id']) {
116 $foundcurrent = true;
117 }
118 if (!$foundcurrent) {
119 $last_fiscal_period = $fiscal_period;
120 }
121 }
122}
123
124$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen');
125$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
126
127
128/*
129 * Actions
130 */
131
132$parameters = array('fiscal_periods' => $fiscal_periods, 'last_fiscal_period' => $last_fiscal_period, 'current_fiscal_period' => $current_fiscal_period, 'next_fiscal_period' => $next_fiscal_period);
133$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
134if ($reshook < 0) {
135 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
136}
137
138if (empty($reshook)) {
139 if (isset($current_fiscal_period)) {
140 if ($action == 'confirm_step_1' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
141 $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
142 $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
143
144 $result = $object->validateMovementForFiscalPeriod($date_start, $date_end);
145 if ($result > 0) {
146 setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs');
147
148 header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
149 exit;
150 } else {
151 setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors');
152 setEventMessages($object->error, $object->errors, 'errors');
153 $action = '';
154 }
155 } elseif ($action == 'confirm_step_2' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
156 $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id');
157 $separate_auxiliary_account = GETPOST('separate_auxiliary_account', 'aZ09');
158 $generate_bookkeeping_records = GETPOST('generate_bookkeeping_records', 'aZ09');
159
160 $error = 0;
161 if ($generate_bookkeeping_records) {
162 if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')) {
163 $error++;
164 setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors');
165 } elseif (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) {
166 $error++;
167 setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors');
168 }
169 }
170
171 if (!$error) {
172 $result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, $separate_auxiliary_account, $generate_bookkeeping_records);
173 if ($result < 0) {
174 setEventMessages($object->error, $object->errors, 'errors');
175 } else {
176 setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
177
178 header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
179 exit;
180 }
181 }
182 } elseif ($action == 'confirm_step_3' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
183 $inventory_journal_id = GETPOSTINT('inventory_journal_id');
184 $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id');
185 $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
186 $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
187
188 $result = $object->insertAccountingReversal($current_fiscal_period['id'], $inventory_journal_id, $new_fiscal_period_id, $date_start, $date_end);
189 if ($result < 0) {
190 setEventMessages($object->error, $object->errors, 'errors');
191 } else {
192 setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs');
193
194 header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
195 exit;
196 }
197 }
198 }
199}
200
201
202/*
203 * View
204 */
205
206$form = new Form($db);
207$formaccounting = new FormAccounting($db);
208
209$title = $langs->trans('Closure');
210
211$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Cl.C3.B4ture_annuelle';
212
213llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-closure-index');
214
215$formconfirm = '';
216
217if (isset($current_fiscal_period)) {
218 if ($action == 'step_1') {
219 $form_question = array();
220
221 $form_question['date_start'] = array(
222 'name' => 'date_start',
223 'type' => 'date',
224 'label' => $langs->trans('DateStart'),
225 'value' => $current_fiscal_period['date_start']
226 );
227 $form_question['date_end'] = array(
228 'name' => 'date_end',
229 'type' => 'date',
230 'label' => $langs->trans('DateEnd'),
231 'value' => $current_fiscal_period['date_end']
232 );
233
234 $formconfirm = $form->formconfirm(
235 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
236 $langs->trans('ValidateMovements'),
237 $langs->trans('DescValidateMovements', $langs->transnoentitiesnoconv("RegistrationInAccounting")),
238 'confirm_step_1',
239 $form_question,
240 '',
241 1,
242 300,
243 600
244 );
245 } elseif ($action == 'step_2') {
246 $form_question = array();
247
248 $fiscal_period_arr = array();
249 foreach ($active_fiscal_periods as $info) {
250 $fiscal_period_arr[$info['id']] = $info['label'];
251 }
252 $form_question['new_fiscal_period_id'] = array(
253 'name' => 'new_fiscal_period_id',
254 'type' => 'select',
255 'label' => $langs->trans('AccountancyClosureStep3NewFiscalPeriod'),
256 'values' => $fiscal_period_arr,
257 'default' => isset($next_active_fiscal_period) ? $next_active_fiscal_period['id'] : '',
258 );
259 $form_question['generate_bookkeeping_records'] = array(
260 'name' => 'generate_bookkeeping_records',
261 'type' => 'checkbox',
262 'label' => $langs->trans('AccountancyClosureGenerateClosureBookkeepingRecords'),
263 'value' => 1
264 );
265 $form_question['separate_auxiliary_account'] = array(
266 'name' => 'separate_auxiliary_account',
267 'type' => 'checkbox',
268 'label' => $langs->trans('AccountancyClosureSeparateAuxiliaryAccounts'),
269 'value' => 0
270 );
271
272 $formconfirm = $form->formconfirm(
273 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
274 $langs->trans('AccountancyClosureClose'),
275 $langs->trans('AccountancyClosureConfirmClose'),
276 'confirm_step_2',
277 $form_question,
278 '',
279 1,
280 300,
281 600
282 );
283 } elseif ($action == 'step_3') {
284 $form_question = array();
285
286 $form_question['inventory_journal_id'] = array(
287 'name' => 'inventory_journal_id',
288 'type' => 'other',
289 'label' => $langs->trans('InventoryJournal'),
290 'value' => $formaccounting->select_journal(0, "inventory_journal_id", 8, 1, 0, 0)
291 );
292 $fiscal_period_arr = array();
293 foreach ($active_fiscal_periods as $info) {
294 $fiscal_period_arr[$info['id']] = $info['label'];
295 }
296 $form_question['new_fiscal_period_id'] = array(
297 'name' => 'new_fiscal_period_id',
298 'type' => 'select',
299 'label' => $langs->trans('AccountancyClosureStep3NewFiscalPeriod'),
300 'values' => $fiscal_period_arr,
301 'default' => isset($next_active_fiscal_period) ? $next_active_fiscal_period['id'] : '',
302 );
303 $form_question['date_start'] = array(
304 'name' => 'date_start',
305 'type' => 'date',
306 'label' => $langs->trans('DateStart'),
307 'value' => dol_time_plus_duree((int) $current_fiscal_period['date_end'], -1, 'm')
308 );
309 $form_question['date_end'] = array(
310 'name' => 'date_end',
311 'type' => 'date',
312 'label' => $langs->trans('DateEnd'),
313 'value' => $current_fiscal_period['date_end']
314 );
315
316 $formconfirm = $form->formconfirm(
317 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
318 $langs->trans('AccountancyClosureAccountingReversal'),
319 $langs->trans('AccountancyClosureConfirmAccountingReversal'),
320 'confirm_step_3',
321 $form_question,
322 '',
323 1,
324 300,
325 600
326 );
327 }
328}
329
330// Call Hook formConfirm
331$parameters = array('formConfirm' => $formconfirm, 'fiscal_periods' => $fiscal_periods, 'last_fiscal_period' => $last_fiscal_period, 'current_fiscal_period' => $current_fiscal_period, 'next_fiscal_period' => $next_fiscal_period);
332$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
333if (empty($reshook)) {
334 $formconfirm .= $hookmanager->resPrint;
335} elseif ($reshook > 0) {
336 $formconfirm = $hookmanager->resPrint;
337}
338
339// Print form confirm
340print $formconfirm;
341
342$fiscal_period_nav_text = $langs->trans("FiscalPeriod");
343
344$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>';
345$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>';
346if (!empty($current_fiscal_period)) {
347 $fiscal_period_nav_text .= $current_fiscal_period['label'].' &nbsp;(' . (isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day') . '&nbsp;-&nbsp;' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')' : '');
348}
349
350print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');
351
352if (empty($current_fiscal_period)) {
353 print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod"));
354} else {
355 if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
356 // Step 1
357 $head = array();
358 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
359 $head[0][1] = $langs->trans("Step").' 1 - '.$langs->trans("AccountancyClosureStep1");
360 $head[0][2] = 'step1';
361 print dol_get_fiche_head($head, 'step1', '', -1, '');
362
363 print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep1Desc") . '</span><br>';
364
365 $count_by_month = $object->getCountByMonthForFiscalPeriod($current_fiscal_period['date_start'], $current_fiscal_period['date_end']);
366
367 if (!is_array($count_by_month)) {
368 setEventMessages($object->error, $object->errors, 'errors');
369 }
370
371 if (empty($count_by_month['total'])) {
372 $buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("ValidateMovements") . '</a>';
373 } else {
374 $buttonvalidate = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_1&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("ValidateMovements") . '</a>';
375 }
376 print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), 0, '', '', '', '', '', -1, '', '', 0, $buttonvalidate, '', 0, 1, 0);
377
378 print '<div class="div-table-responsive-no-min">';
379 print '<table class="noborder centpercent">';
380
381 print '<tr class="liste_titre">';
382 $nb_years = is_array($count_by_month['list']) ? count($count_by_month['list']) : 0;
383 if ($nb_years > 1) {
384 print '<td class="right">' . $langs->trans("Year") . '</td>';
385 }
386 for ($i = 1; $i <= 12; $i++) {
387 print '<td class="right">' . $langs->trans('MonthShort' . str_pad((string) $i, 2, '0', STR_PAD_LEFT)) . '</td>';
388 }
389 print '<td class="right"><b>' . $langs->trans("Total") . '</b></td>';
390 print '</tr>';
391
392 if (is_array($count_by_month['list'])) {
393 foreach ($count_by_month['list'] as $info) {
394 print '<tr class="oddeven">';
395 if ($nb_years > 1) {
396 print '<td class="right">' . $info['year'] . '</td>';
397 }
398 for ($i = 1; $i <= 12; $i++) {
399 print '<td class="right">' . ((int) $info['count'][$i]) . '</td>';
400 }
401 print '<td class="right"><b>' . $info['total'] . '</b></td></tr>';
402 }
403 }
404
405 print "</table>\n";
406 print '</div>';
407
408 print '<br>';
409 }
410
411 // Step 2
412 $head = array();
413 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
414 $head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2");
415 $head[0][2] = 'step2';
416 print dol_get_fiche_head($head, 'step2', '', -1, '');
417
418 $button = '';
419 // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep2Desc") . '</span><br>';
420 if ((empty($count_by_month['total']) || getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) && empty($current_fiscal_period['status'])) {
421 // If no unlocked record and period still open
422 $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_2&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureClose") . '</a>';
423 } else {
424 if (!empty($current_fiscal_period['status'])) {
425 $button = '<a class="butActionRefused classfortooltip" href="#" title="The period is already closed. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
426 } elseif (!empty($count_by_month['total'])) {
427 $button = '<a class="butActionRefused classfortooltip" href="#" title="There is some lines not yet locked. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
428 }
429 }
430 print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
431
432 print '<br>';
433
434 // Step 3
435 $head = array();
436 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
437 $head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3");
438 $head[0][2] = 'step3';
439 print dol_get_fiche_head($head, 'step3', '', -1, '');
440
441 // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep3Desc") . '</span><br>';
442
443 if (empty($current_fiscal_period['status'])) {
444 $button = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
445 } else {
446 $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_3&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
447 }
448 print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
449}
450
451// End of page
452llxFooter();
453$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:87
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage Ledger (General Ledger and Subledger)
Class to manage generation of HTML components for accounting management.
Class to manage generation of HTML components Only common components must be here.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
Definition date.lib.php:125
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_now($mode='auto')
Return date for now.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_previous($titlealt='default', $moreatt='')
Show previous logo.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_next($titlealt='default', $moreatt='')
Show next logo.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.