dolibarr 23.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-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';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
39require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
40require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
41
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 // Only select by ID, not by date range for closure page
97 if (!empty($fiscal_period_id) && $fiscal_period_id == $fiscal_period['id']) {
98 $current_fiscal_period = $fiscal_period;
99 } else {
100 $last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period
101 }
102 }
103 }
104}
105
106// 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
107if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) {
108 $current_fiscal_period = $first_active_fiscal_period;
109 $last_fiscal_period = null;
110 $foundcurrent = false;
111 foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start
112 if ($foundcurrent) {
113 $next_fiscal_period = $fiscal_period;
114 break;
115 }
116 if ($fiscal_period['id'] == $current_fiscal_period['id']) {
117 $foundcurrent = true;
118 }
119 if (!$foundcurrent) {
120 $last_fiscal_period = $fiscal_period;
121 }
122 }
123}
124
125$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen');
126$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
127
128
129/*
130 * Actions
131 */
132
133$parameters = array('fiscal_periods' => $fiscal_periods, 'last_fiscal_period' => $last_fiscal_period, 'current_fiscal_period' => $current_fiscal_period, 'next_fiscal_period' => $next_fiscal_period);
134$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
135if ($reshook < 0) {
136 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
137}
138
139if (empty($reshook)) {
140 if (isset($current_fiscal_period)) {
141 if ($action == 'confirm_step_1' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
142 $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
143 $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
144
145 $result = $object->validateMovementForFiscalPeriod($date_start, $date_end);
146 if ($result > 0) {
147 setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs');
148
149 header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
150 exit;
151 } else {
152 setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors');
153 setEventMessages($object->error, $object->errors, 'errors');
154 $action = '';
155 }
156 } elseif ($action == 'confirm_step_2' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
157 $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id');
158 $separate_auxiliary_account = (!empty(GETPOST('separate_auxiliary_account')) ? 1 : 0);
159 $generate_bookkeeping_records = (!empty(GETPOST('generate_bookkeeping_records')) ? 1 : 0);
160
161 $error = 0;
162 if ($generate_bookkeeping_records) {
163 if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')) {
164 $error++;
165 setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors');
166 } elseif (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) {
167 $error++;
168 setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors');
169 }
170 }
171
172 if (!$error) {
173 $result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, (bool) $separate_auxiliary_account, (bool) $generate_bookkeeping_records);
174 if ($result < 0) {
175 setEventMessages($object->error, $object->errors, 'errors');
176 } else {
177 setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
178
179 header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
180 exit;
181 }
182 }
183 } elseif ($action == 'confirm_step_3' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) {
184 $inventory_journal_id = GETPOSTINT('inventory_journal_id');
185 $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id');
186 $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
187 $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
188
189 $result = $object->insertAccountingReversal($current_fiscal_period['id'], $inventory_journal_id, $new_fiscal_period_id, $date_start, $date_end);
190 if ($result < 0) {
191 setEventMessages($object->error, $object->errors, 'errors');
192 } else {
193 setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs');
194
195 header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
196 exit;
197 }
198 }
199 }
200}
201
202
203/*
204 * View
205 */
206
207$form = new Form($db);
208$formaccounting = new FormAccounting($db);
209
210$title = $langs->trans('Closure');
211
212$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Cl.C3.B4ture_annuelle';
213
214llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-closure-index');
215
216$formconfirm = '';
217
218if (isset($current_fiscal_period)) {
219 if ($action == 'step_1') {
220 $form_question = array();
221
222 $form_question['date_start'] = array(
223 'name' => 'date_start',
224 'type' => 'date',
225 'label' => $langs->trans('DateStart'),
226 'value' => $current_fiscal_period['date_start']
227 );
228 $form_question['date_end'] = array(
229 'name' => 'date_end',
230 'type' => 'date',
231 'label' => $langs->trans('DateEnd'),
232 'value' => $current_fiscal_period['date_end']
233 );
234
235 $formconfirm = $form->formconfirm(
236 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
237 $langs->trans('ValidateMovements'),
238 $langs->trans('DescValidateMovements', $langs->transnoentitiesnoconv("RegistrationInAccounting")),
239 'confirm_step_1',
240 $form_question,
241 '',
242 1,
243 340,
244 600
245 );
246 } elseif ($action == 'step_2') {
247 $form_question = array();
248
249 $fiscal_period_arr = array();
250 foreach ($active_fiscal_periods as $info) {
251 $fiscal_period_arr[$info['id']] = $info['label'];
252 }
253 $form_question['new_fiscal_period_id'] = array(
254 'name' => 'new_fiscal_period_id',
255 'type' => 'select',
256 'label' => $langs->trans('AccountancyClosureStep3NewFiscalPeriod'),
257 'values' => $fiscal_period_arr,
258 'default' => isset($next_active_fiscal_period) ? $next_active_fiscal_period['id'] : '',
259 );
260 $form_question['generate_bookkeeping_records'] = array(
261 'name' => 'generate_bookkeeping_records',
262 'type' => 'checkbox',
263 'label' => $langs->trans('AccountancyClosureGenerateClosureBookkeepingRecords'),
264 'value' => 1
265 );
266 $form_question['separate_auxiliary_account'] = array(
267 'name' => 'separate_auxiliary_account',
268 'type' => 'checkbox',
269 'label' => $langs->trans('AccountancyClosureSeparateAuxiliaryAccounts'),
270 'value' => 0
271 );
272
273 $formconfirm = $form->formconfirm(
274 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
275 $langs->trans('AccountancyClosureClose'),
276 $langs->trans('AccountancyClosureConfirmClose'),
277 'confirm_step_2',
278 $form_question,
279 '',
280 1,
281 340,
282 600
283 );
284 } elseif ($action == 'step_3') {
285 $form_question = array();
286
287 $form_question['inventory_journal_id'] = array(
288 'name' => 'inventory_journal_id',
289 'type' => 'other',
290 'label' => $langs->trans('InventoryJournal'),
291 'value' => $formaccounting->select_journal('0', "inventory_journal_id", 8, 1, 0, 0)
292 );
293 $fiscal_period_arr = array();
294 foreach ($active_fiscal_periods as $info) {
295 $fiscal_period_arr[$info['id']] = $info['label'];
296 }
297 $form_question['new_fiscal_period_id'] = array(
298 'name' => 'new_fiscal_period_id',
299 'type' => 'select',
300 'label' => $langs->trans('AccountancyClosureStep3NewFiscalPeriod'),
301 'values' => $fiscal_period_arr,
302 'default' => isset($next_active_fiscal_period) ? $next_active_fiscal_period['id'] : '',
303 );
304 $form_question['date_start'] = array(
305 'name' => 'date_start',
306 'type' => 'date',
307 'label' => $langs->trans('DateStart'),
308 'value' => dol_time_plus_duree((int) $current_fiscal_period['date_end'], -1, 'm')
309 );
310 $form_question['date_end'] = array(
311 'name' => 'date_end',
312 'type' => 'date',
313 'label' => $langs->trans('DateEnd'),
314 'value' => $current_fiscal_period['date_end']
315 );
316
317 $formconfirm = $form->formconfirm(
318 $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
319 $langs->trans('AccountancyClosureAccountingReversal'),
320 $langs->trans('AccountancyClosureConfirmAccountingReversal'),
321 'confirm_step_3',
322 $form_question,
323 '',
324 1,
325 340,
326 600
327 );
328 }
329}
330
331// Call Hook formConfirm
332$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);
333$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
334if (empty($reshook)) {
335 $formconfirm .= $hookmanager->resPrint;
336} elseif ($reshook > 0) {
337 $formconfirm = $hookmanager->resPrint;
338}
339
340// Print form confirm
341print $formconfirm;
342
343$fiscal_period_nav_text = $langs->trans("FiscalPeriod");
344
345if (!empty($current_fiscal_period)) {
346 $fiscal_period_nav_text .= ' '.$current_fiscal_period['label'].' &nbsp;(' . dol_print_date($current_fiscal_period['date_start'], 'day') . '&nbsp;-&nbsp;' . ($current_fiscal_period['date_end'] ? dol_print_date($current_fiscal_period['date_end'], 'day') : '?'). ')';
347}
348$fiscal_period_nav_text .= '&nbsp; &nbsp; ';
349$fiscal_period_nav_text .= '<a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>';
350$fiscal_period_nav_text .= '&nbsp;';
351$fiscal_period_nav_text .= '<a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>';
352
353print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');
354
355if (empty($current_fiscal_period)) {
356 print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod"));
357} else {
358 if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
359 // Step 1
360 $head = array();
361 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
362 $head[0][1] = $langs->trans("Step").' 1 - '.$langs->trans("AccountancyClosureStep1");
363 $head[0][2] = 'step1';
364 print dol_get_fiche_head($head, 'step1', '', -1, '');
365
366 //print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep1Desc") . '</span><br>';
367
368 $count_by_month = $object->getCountByMonthForFiscalPeriod((int) $current_fiscal_period['date_start'], (int) $current_fiscal_period['date_end']);
369
370 if (!is_array($count_by_month)) {
371 setEventMessages($object->error, $object->errors, 'errors');
372 }
373
374 if (empty($count_by_month['total'])) {
375 $buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("ValidateMovements") . '</a>';
376 } else {
377 $buttonvalidate = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_1&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("ValidateMovements") . '</a>';
378 }
379 print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), 0, '', '', '', '', '', -1, '', '', 0, $buttonvalidate, '', 0, 1, 0);
380
381 print '<div class="div-table-responsive-no-min">';
382 print '<table class="noborder centpercent">';
383
384 print '<tr class="liste_titre">';
385 $nb_years = is_array($count_by_month['list']) ? count($count_by_month['list']) : 0;
386 if ($nb_years > 1) {
387 print '<td class="right">' . $langs->trans("Year") . '</td>';
388 }
389 for ($i = 1; $i <= 12; $i++) {
390 print '<td class="right">' . $langs->trans('MonthShort' . str_pad((string) $i, 2, '0', STR_PAD_LEFT)) . '</td>';
391 }
392 print '<td class="right"><b>' . $langs->trans("Total") . '</b></td>';
393 print '</tr>';
394
395 if (is_array($count_by_month['list']) && count($count_by_month['list']) > 0) {
396 foreach ($count_by_month['list'] as $info) {
397 print '<tr class="oddeven">';
398 if ($nb_years > 1) {
399 print '<td class="right">' . $info['year'] . '</td>';
400 }
401 for ($i = 1; $i <= 12; $i++) {
402 print '<td class="right">' . ((int) $info['count'][$i]) . '</td>';
403 }
404 print '<td class="right"><b>' . $info['total'] . '</b></td>';
405 print '</tr>';
406 }
407 } else {
408 print '<tr class="oddeven"><td colspan="' . (12 + ($nb_years > 1 ? 1 : 0) + 1) . '">';
409 print '<span class="opacitymedium">';
410 print $langs->trans("None");
411 print '</span>';
412 print '</td></tr>';
413 }
414
415 print "</table>\n";
416 print '</div>';
417
418 print '<br>';
419 }
420
421 // Step 2
422 $head = array();
423 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
424 $head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2");
425 $head[0][2] = 'step2';
426 print dol_get_fiche_head($head, 'step2', '', -1, '');
427
428 $button = '';
429 // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep2Desc") . '</span><br>';
430 if ((empty($count_by_month['total']) || getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) && empty($current_fiscal_period['status'])) {
431 // If no unlocked record and period still open
432 $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_2&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureClose") . '</a>';
433 } else {
434 if (!empty($current_fiscal_period['status'])) {
435 $button = '<a class="butActionRefused classfortooltip" href="#" title="The period is already closed. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
436 } elseif (!empty($count_by_month['total'])) {
437 $button = '<a class="butActionRefused classfortooltip" href="#" title="There is some lines not yet locked. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
438 }
439 }
440 print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
441
442 print '<br>';
443
444 // Step 3
445 $head = array();
446 $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
447 $head[0][1] = $langs->trans("Step"). ' ' . (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3");
448 $head[0][2] = 'step3';
449 print dol_get_fiche_head($head, 'step3', '', -1, '');
450
451 // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep3Desc") . '</span><br>';
452
453 if (empty($current_fiscal_period['status'])) {
454 $button = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
455 } else {
456 $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_3&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
457 }
458 print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
459}
460
461// End of page
462llxFooter();
463$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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_now($mode='gmt')
Return date for now.
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...
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.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
img_next($titlealt='default', $moreatt='')
Show next logo.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.