dolibarr 25.0.0-alpha
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
3 * Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2012-2014 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
6 * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
7 * Copyright (C) 2021-2026 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
31// Load Dolibarr environment
32require '../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
43require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
44require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
45require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
46require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
47
48if (isModEnabled('expensereport')) {
49 require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
50}
51if (isModEnabled('recruitment')) {
52 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
53 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
54}
55if (isModEnabled('holiday')) {
56 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
57}
58
59
60// Load translation files required by the page
61$langs->loadLangs(array('users', 'holiday', 'trips', 'boxes'));
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('hrmindex'));
65
66// Get Parameters
67$socid = GETPOSTINT("socid");
68
69// Protection if external user
70if ($user->socid > 0) {
72}
73
74if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
75 $setupcompanynotcomplete = 1;
76} else {
77 $setupcompanynotcomplete = 0;
78}
79
80$max = getDolUserInt('MAIN_SIZE_SHORTLIST_LIMIT', getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5));
81
82
83/*
84 * Actions
85 */
86
87// Update sold
88if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) {
89 $holidaystatic = new Holiday($db);
90 $result = $holidaystatic->updateBalance();
91}
92
93// Add box (when submit is done from a form when ajax disabled)
94include DOL_DOCUMENT_ROOT.'/core/actions_addbox.inc.php';
95
96
97/*
98 * View
99 */
100
101$listofsearchfields = array();
102
103$childids = $user->getAllChildIds();
104$childids[] = $user->id;
105
106$title = $langs->trans('HRMArea');
107
108// Load $resultboxes
109$resultboxes = FormOther::getBoxesArea($user, "10");
110
111llxHeader('', $title, '');
112
113print load_fiche_titre($langs->trans("HRMArea"), $resultboxes['selectboxlist'], 'hrm');
114
115
116if (!empty($setupcompanynotcomplete)) {
117 $langs->load("errors");
118 $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
119 print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home&action=edit&token='.newToken().'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
120
121 llxFooter();
122 exit;
123}
124
125
126print '<div class="fichecenter">';
127
128print '<div class="twocolumns">';
129
130print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
131
132
133if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This is useless due to the global search combo
134 if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
135 $langs->load("holiday");
136 $listofsearchfields['search_holiday'] = array('text' => 'TitreRequestCP');
137 }
138 if (isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire')) {
139 $langs->load("trips");
140 $listofsearchfields['search_deplacement'] = array('text' => 'ExpenseReport');
141 }
142 if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire')) {
143 $langs->load("trips");
144 $listofsearchfields['search_expensereport'] = array('text' => 'ExpenseReport');
145 }
146 if (count($listofsearchfields)) {
147 print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
148 print '<input type="hidden" name="token" value="'.newToken().'">';
149 print '<div class="div-table-responsive-no-min">';
150 print '<table class="noborder nohover centpercent">';
151 $i = 0;
152 foreach ($listofsearchfields as $key => $value) {
153 if ($i == 0) {
154 print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
155 }
156 print '<tr>';
157 print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
158 if ($i == 0) {
159 print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
160 }
161 print '</tr>';
162 $i++;
163 }
164 print '</table>';
165 print '</div>';
166 print '</form>';
167 print '<br>';
168 }
169}
170
171
172if (isModEnabled('holiday')) {
173 if (!getDolGlobalString('HOLIDAY_HIDE_BALANCE')) {
174 $holidaystatic = new Holiday($db);
175 $user_id = $user->id;
176
177 print '<div class="div-table-responsive-no-min">';
178 print '<table class="noborder nohover centpercent">';
179 print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Holidays").'</th></tr>';
180 print '<tr class="oddeven nohover">';
181 print '<td>';
182
183 $out = '';
184 $nb_holiday = 0;
185 $typeleaves = $holidaystatic->getTypes(1, 1);
186 foreach ($typeleaves as $key => $val) {
187 $nb_type = $holidaystatic->getCPforUser($user->id, $val['rowid']);
188 $nb_holiday += $nb_type;
189 $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>';
190 }
191 $balancetoshow = $langs->trans('SoldeCPUser', '{s1}');
192 print '<div class="valignmiddle div-balanceofleave">'.str_replace('{s1}', img_picto('', 'holiday', 'class="paddingleft pictofixedwidth"').'<span class="balanceofleave valignmiddle'.($nb_holiday > 0 ? ' amountpaymentcomplete' : ($nb_holiday < 0 ? ' amountremaintopay' : ' amountpaymentneutral')).'">'.round($nb_holiday, 5).'</span>', $balancetoshow).'</div>';
193 print '<span class="opacitymedium">'.$out.'</span>';
194
195 print '</td>';
196 print '</tr>';
197 print '</table></div><br>';
198 } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) {
199 print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'<br>';
200 }
201}
202
203
204print $resultboxes['boxlista'];
205
206print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
207
208
209// Latest modified leave requests
210if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
211 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.gender, u.statut as user_status,";
212 $sql .= " x.rowid, x.ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status";
213 $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
214 $sql .= " WHERE u.rowid = x.fk_user";
215 $sql .= " AND x.entity = ".((int) $conf->entity);
216 if (!$user->hasRight('holiday', 'readall')) {
217 $sql .= ' AND x.fk_user IN ('.$db->sanitize(implode(',', $childids)).')';
218 }
219 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
220 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
221 $sql .= $db->order("x.tms", "DESC");
222 $sql .= $db->plimit($max, 0);
223
224 $result = $db->query($sql);
225 if ($result) {
226 $var = false;
227 $num = $db->num_rows($result);
228
229 $holidaystatic = new Holiday($db);
230 $userstatic = new User($db);
231
232 $listhalfday = array(
233 'morning' => $langs->trans("Morning"),
234 'morningshort' => $langs->trans("Morning"),
235 "afternoon" => $langs->trans("Afternoon"),
236 "afternoonshort" => $langs->trans("Afternoon")
237 );
238
239 $typeleaves = $holidaystatic->getTypes(1, -1);
240
241 $i = 0;
242
243 print '<div class="div-table-responsive-no-min">';
244 print '<table class="noborder centpercent">';
245 print '<tr class="liste_titre">';
246 print '<th colspan="3">'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num));
247 print '<a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
248 print '<span class="badge marginleftonlyshort">...</span>';
249 print '</a>';
250 print '</th>';
251 print '<th></th>';
252 print '<th></th>';
253 print '<th></th>';
254 print '<th class="right">';
255 print '</th>';
256 print '</tr>';
257
258 if ($num) {
259 while ($i < $num && $i < $max) {
260 $obj = $db->fetch_object($result);
261
262 $holidaystatic->id = $obj->rowid;
263 $holidaystatic->ref = $obj->ref;
264 $holidaystatic->status = $obj->status;
265 $holidaystatic->date_debut = $db->jdate($obj->date_start);
266
267 $userstatic->id = $obj->uid;
268 $userstatic->lastname = $obj->lastname;
269 $userstatic->firstname = $obj->firstname;
270 $userstatic->login = $obj->login;
271 $userstatic->photo = $obj->photo;
272 $userstatic->email = $obj->email;
273 $userstatic->gender = $obj->gender;
274 $userstatic->status = $obj->user_status;
275
276 print '<tr class="oddeven">';
277 print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
278 print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
279
280 $leavecode = empty($typeleaves[$obj->fk_type]) ? 'Undefined' : $typeleaves[$obj->fk_type]['code'];
281 print '<td class="tdoverflowmax80" title="'.dol_escape_htmltag($langs->trans($leavecode)).'">'.dol_escape_htmltag($langs->trans($leavecode)).'</td>';
282
283 $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
284 $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
285
286 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat');
287 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$starthalfday])).'">';
288 $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
289 print $labelshort;
290 print '</span>';
291 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat');
292 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$endhalfday])).'">';
293 $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
294 print $labelshort;
295 print '</span>';
296 print '<td class="right" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($obj->dm), 'dayhourreduceformat').'">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').'</td>';
297 print '<td class="right nowrap" width="16">'.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'</td>';
298 print '</tr>';
299
300 $i++;
301 }
302 } else {
303 print '<tr class="oddeven"><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
304 }
305 print '</table>';
306 print '</div>';
307 print '<br>';
308 } else {
309 dol_print_error($db);
310 }
311}
312
313
314// Latest modified expense report
315if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
316 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,";
317 $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ht, x.total_ttc, x.fk_statut as status";
318 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
319 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
320 $sql .= " WHERE u.rowid = x.fk_user_author";
321 $sql .= " AND x.entity = ".((int) $conf->entity);
322 if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expensereport', 'lire_tous')) {
323 $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(implode(',', $childids)).')';
324 }
325 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
326 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
327 $sql .= $db->order("x.tms", "DESC");
328 $sql .= $db->plimit($max, 0);
329
330 $result = $db->query($sql);
331 if ($result) {
332 $num = $db->num_rows($result);
333
334 $i = 0;
335
336 print '<div class="div-table-responsive-no-min">';
337 print '<table class="noborder centpercent">';
338 print '<tr class="liste_titre">';
339 print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num));
340 print '<a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
341 print '<span class="badge marginleftonlyshort">...</span>';
342 //print img_picto($langs->trans("FullList"), 'expensereport');
343 print '</a>';
344 print '</th>';
345 print '<th class="right">'.$langs->trans("AmountHT").'</th>';
346 print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
347 print '<th></th>';
348 print '<th class="right">';
349 print '</th>';
350 print '</tr>';
351
352 if ($num) {
353 $expensereportstatic = new ExpenseReport($db);
354 $userstatic = new User($db);
355 while ($i < $num && $i < $max) {
356 $obj = $db->fetch_object($result);
357
358 $expensereportstatic->id = $obj->rowid;
359 $expensereportstatic->ref = $obj->ref;
360 $expensereportstatic->statut = $obj->status; // deprecated
361 $expensereportstatic->status = $obj->status;
362
363 $userstatic->id = $obj->uid;
364 $userstatic->lastname = $obj->lastname;
365 $userstatic->firstname = $obj->firstname;
366 $userstatic->email = $obj->email;
367 $userstatic->login = $obj->login;
368 $userstatic->status = $obj->user_status;
369 $userstatic->gender = $obj->gender;
370 $userstatic->photo = $obj->photo;
371
372 print '<tr class="oddeven">';
373 print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
374 print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
375 print '<td class="right amount">'.price($obj->total_ht).'</td>';
376 print '<td class="right amount">'.price($obj->total_ttc).'</td>';
377 print '<td class="right" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($obj->dm), 'dayhour').'">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').'</td>';
378 print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
379 print '</tr>';
380
381 $i++;
382 }
383 } else {
384 print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
385 }
386 print '</table>';
387 print '</div>';
388 print '<br>';
389 } else {
390 dol_print_error($db);
391 }
392}
393
394
395// Last modified job position
396if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
397 $staticrecruitmentcandidature = new RecruitmentCandidature($db);
398 $staticrecruitmentjobposition = new RecruitmentJobPosition($db);
399 $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
400 $sql .= " rp.rowid as jobid, rp.ref as jobref, rp.label";
401 $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
402 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid";
403 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
404 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
405 }
406 $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")";
407 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
408 $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
409 }
410 if ($socid) {
411 $sql .= " AND rp.fk_soc = ".((int) $socid);
412 }
413 $sql .= $db->order("rc.tms", "DESC");
414 $sql .= $db->plimit($max, 0);
415
416 $resql = $db->query($sql);
417 if ($resql) {
418 $num = $db->num_rows($resql);
419 $i = 0;
420
421 print '<div class="div-table-responsive-no-min">';
422 print '<table class="noborder centpercent">';
423 print '<tr class="liste_titre">';
424 print '<th colspan="3">';
425 print $langs->trans("BoxTitleLatestModifiedCandidatures", min($max, $num));
426 print '<a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
427 print '<span class="badge marginleftonlyshort">...</span>';
428 //print img_picto($langs->trans("FullList"), 'recruitmentcandidature');
429 print '</a>';
430 print '</th>';
431 print '<th></th>';
432 print '<th class="right">';
433 print '</th>';
434 print '</tr>';
435 if ($num) {
436 while ($i < $num) {
437 $objp = $db->fetch_object($resql);
438 $staticrecruitmentcandidature->id = $objp->rowid;
439 $staticrecruitmentcandidature->ref = $objp->ref;
440 $staticrecruitmentcandidature->email = $objp->email;
441 $staticrecruitmentcandidature->status = $objp->status;
442 $staticrecruitmentcandidature->date_creation = $objp->date_creation;
443 $staticrecruitmentcandidature->firstname = $objp->firstname;
444 $staticrecruitmentcandidature->lastname = $objp->lastname;
445
446 $staticrecruitmentjobposition->id = $objp->jobid;
447 $staticrecruitmentjobposition->ref = $objp->jobref;
448 $staticrecruitmentjobposition->label = $objp->label;
449
450 print '<tr class="oddeven">';
451 print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
452 print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
453 print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
454 print '<td class="right nowrap" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($objp->tms), 'dayhour').'">'.dol_print_date($db->jdate($objp->tms), 'dayreduceformat').'</td>';
455 print '<td class="right nowrap" width="16">';
456 print $staticrecruitmentcandidature->getLibStatut(3);
457 print "</td>";
458 print '</tr>';
459 $i++;
460 }
461
462 $db->free($resql);
463 } else {
464 print '<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
465 }
466 print "</table>";
467 print "</div>";
468 print "<br>";
469 } else {
470 dol_print_error($db);
471 }
472}
473
474print $resultboxes['boxlistb'];
475
476print '</div></div></div>';
477
478// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
479$parameters = array('user' => $user);
480$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook
481
482// End of page
483llxFooter();
484$db->close();
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 Trips and Expenses.
static getBoxesArea($user, $areacode)
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of us...
Class of the module paid holiday.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
getDolUserInt($key, $default=0, $tmpuser=null)
Return Dolibarr user constant int value.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Definition html.lib.php:181
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.