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