dolibarr 21.0.0-beta
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-2024 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024 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';
33require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
34require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
39require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
40
41if (isModEnabled('deplacement')) {
42 require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
43}
44if (isModEnabled('expensereport')) {
45 require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
46}
47if (isModEnabled('recruitment')) {
48 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
49 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
50}
51if (isModEnabled('holiday')) {
52 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
53}
54
55
64// Load translation files required by the page
65$langs->loadLangs(array('users', 'holiday', 'trips', 'boxes'));
66
67// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
68$hookmanager = new HookManager($db);
69
70$hookmanager->initHooks(array('hrmindex'));
71
72// Get Parameters
73$socid = GETPOSTINT("socid");
74
75// Protection if external user
76if ($user->socid > 0) {
78}
79
80if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
81 $setupcompanynotcomplete = 1;
82}
83
84$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5);
85
86
87/*
88 * Actions
89 */
90
91// Update sold
92if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) {
93 $holidaystatic = new Holiday($db);
94 $result = $holidaystatic->updateBalance();
95}
96
97
98/*
99 * View
100 */
101
102$listofsearchfields = array();
103
104$childids = $user->getAllChildIds();
105$childids[] = $user->id;
106
107$title = $langs->trans('HRMArea');
108
109llxHeader('', $title, '');
110
111print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm');
112
113
114if (!empty($setupcompanynotcomplete)) {
115 $langs->load("errors");
116 $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
117 print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit&token='.newToken()).'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
118
119 llxFooter();
120 exit;
121}
122
123
124print '<div class="fichecenter">';
125
126print '<div class="twocolumns">';
127
128print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
129
130
131if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This is useless due to the global search combo
132 if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
133 $langs->load("holiday");
134 $listofsearchfields['search_holiday'] = array('text' => 'TitreRequestCP');
135 }
136 if (isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire')) {
137 $langs->load("trips");
138 $listofsearchfields['search_deplacement'] = array('text' => 'ExpenseReport');
139 }
140 if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire')) {
141 $langs->load("trips");
142 $listofsearchfields['search_expensereport'] = array('text' => 'ExpenseReport');
143 }
144 if (count($listofsearchfields)) {
145 print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
146 print '<input type="hidden" name="token" value="'.newToken().'">';
147 print '<div class="div-table-responsive-no-min">';
148 print '<table class="noborder nohover centpercent">';
149 $i = 0;
150 foreach ($listofsearchfields as $key => $value) {
151 if ($i == 0) {
152 print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
153 }
154 print '<tr>';
155 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>';
156 if ($i == 0) {
157 print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
158 }
159 print '</tr>';
160 $i++;
161 }
162 print '</table>';
163 print '</div>';
164 print '</form>';
165 print '<br>';
166 }
167}
168
169
170if (isModEnabled('holiday')) {
171 if (!getDolGlobalString('HOLIDAY_HIDE_BALANCE')) {
172 $holidaystatic = new Holiday($db);
173 $user_id = $user->id;
174
175 print '<div class="div-table-responsive-no-min">';
176 print '<table class="noborder nohover centpercent">';
177 print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Holidays").'</th></tr>';
178 print '<tr class="oddeven nohover">';
179 print '<td>';
180
181 $out = '';
182 $nb_holiday = 0;
183 $typeleaves = $holidaystatic->getTypes(1, 1);
184 foreach ($typeleaves as $key => $val) {
185 $nb_type = $holidaystatic->getCPforUser($user->id, $val['rowid']);
186 $nb_holiday += $nb_type;
187 $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>';
188 }
189 $balancetoshow = $langs->trans('SoldeCPUser', '{s1}');
190 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>';
191 print '<span class="opacitymedium">'.$out.'</span>';
192
193 print '</td>';
194 print '</tr>';
195 print '</table></div><br>';
196 } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) {
197 print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'<br>';
198 }
199}
200
201
202print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
203
204
205// Latest modified leave requests
206if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
207 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.gender, u.statut as user_status,";
208 $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";
209 $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
210 $sql .= " WHERE u.rowid = x.fk_user";
211 $sql .= " AND x.entity = ".$conf->entity;
212 if (!$user->hasRight('holiday', 'readall')) {
213 $sql .= ' AND x.fk_user IN ('.$db->sanitize(implode(',', $childids)).')';
214 }
215 //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);
216 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
217 $sql .= $db->order("x.tms", "DESC");
218 $sql .= $db->plimit($max, 0);
219
220 $result = $db->query($sql);
221 if ($result) {
222 $var = false;
223 $num = $db->num_rows($result);
224
225 $holidaystatic = new Holiday($db);
226 $userstatic = new User($db);
227
228 $listhalfday = array(
229 'morning' => $langs->trans("Morning"),
230 'morningshort' => $langs->trans("Morning"),
231 "afternoon" => $langs->trans("Afternoon"),
232 "afternoonshort" => $langs->trans("Afternoon")
233 );
234
235 $typeleaves = $holidaystatic->getTypes(1, -1);
236
237 $i = 0;
238
239 print '<div class="div-table-responsive-no-min">';
240 print '<table class="noborder centpercent">';
241 print '<tr class="liste_titre">';
242 print '<th colspan="3">'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num));
243 print '<a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
244 print '<span class="badge marginleftonlyshort">...</span>';
245 print '</a>';
246 print '</th>';
247 print '<th></th>';
248 print '<th></th>';
249 print '<th></th>';
250 print '<th class="right">';
251 print '</th>';
252 print '</tr>';
253
254 if ($num) {
255 while ($i < $num && $i < $max) {
256 $obj = $db->fetch_object($result);
257
258 $holidaystatic->id = $obj->rowid;
259 $holidaystatic->ref = $obj->ref;
260 $holidaystatic->status = $obj->status;
261 $holidaystatic->date_debut = $db->jdate($obj->date_start);
262
263 $userstatic->id = $obj->uid;
264 $userstatic->lastname = $obj->lastname;
265 $userstatic->firstname = $obj->firstname;
266 $userstatic->login = $obj->login;
267 $userstatic->photo = $obj->photo;
268 $userstatic->email = $obj->email;
269 $userstatic->gender = $obj->gender;
270 $userstatic->status = $obj->user_status;
271
272 print '<tr class="oddeven">';
273 print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
274 print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
275
276 $leavecode = empty($typeleaves[$obj->fk_type]) ? 'Undefined' : $typeleaves[$obj->fk_type]['code'];
277 print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($langs->trans($leavecode)).'">'.dol_escape_htmltag($langs->trans($leavecode)).'</td>';
278
279 $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
280 $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
281
282 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat');
283 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$starthalfday])).'">';
284 $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
285 print $labelshort;
286 print '</span>';
287 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat');
288 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$endhalfday])).'">';
289 $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
290 print $labelshort;
291 print '</span>';
292 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>';
293 print '<td class="right nowrap" width="16">'.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'</td>';
294 print '</tr>';
295
296 $i++;
297 }
298 } else {
299 print '<tr class="oddeven"><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
300 }
301 print '</table>';
302 print '</div>';
303 print '<br>';
304 } else {
305 dol_print_error($db);
306 }
307}
308
309
310// Latest modified expense report
311if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
312 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,";
313 $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";
314 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
315 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
316 $sql .= " WHERE u.rowid = x.fk_user_author";
317 $sql .= " AND x.entity = ".$conf->entity;
318 if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expensereport', 'lire_tous')) {
319 $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(implode(',', $childids)).')';
320 }
321 //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);
322 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
323 $sql .= $db->order("x.tms", "DESC");
324 $sql .= $db->plimit($max, 0);
325
326 $result = $db->query($sql);
327 if ($result) {
328 $num = $db->num_rows($result);
329
330 $i = 0;
331
332 print '<div class="div-table-responsive-no-min">';
333 print '<table class="noborder centpercent">';
334 print '<tr class="liste_titre">';
335 print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num));
336 print '<a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
337 print '<span class="badge marginleftonlyshort">...</span>';
338 //print img_picto($langs->trans("FullList"), 'expensereport');
339 print '</a>';
340 print '</th>';
341 print '<th class="right">'.$langs->trans("AmountHT").'</th>';
342 print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
343 print '<th></th>';
344 print '<th class="right">';
345 print '</th>';
346 print '</tr>';
347
348 if ($num) {
349 $expensereportstatic = new ExpenseReport($db);
350 $userstatic = new User($db);
351 while ($i < $num && $i < $max) {
352 $obj = $db->fetch_object($result);
353
354 $expensereportstatic->id = $obj->rowid;
355 $expensereportstatic->ref = $obj->ref;
356 $expensereportstatic->statut = $obj->status;
357 $expensereportstatic->status = $obj->status;
358
359 $userstatic->id = $obj->uid;
360 $userstatic->lastname = $obj->lastname;
361 $userstatic->firstname = $obj->firstname;
362 $userstatic->email = $obj->email;
363 $userstatic->login = $obj->login;
364 $userstatic->status = $obj->user_status;
365 $userstatic->gender = $obj->gender;
366 $userstatic->photo = $obj->photo;
367
368 print '<tr class="oddeven">';
369 print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
370 print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
371 print '<td class="right amount">'.price($obj->total_ht).'</td>';
372 print '<td class="right amount">'.price($obj->total_ttc).'</td>';
373 print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').'</td>';
374 print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
375 print '</tr>';
376
377 $i++;
378 }
379 } else {
380 print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
381 }
382 print '</table>';
383 print '</div>';
384 print '<br>';
385 } else {
386 dol_print_error($db);
387 }
388}
389
390
391// Last modified job position
392if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
393 $staticrecruitmentcandidature = new RecruitmentCandidature($db);
394 $staticrecruitmentjobposition = new RecruitmentJobPosition($db);
395 $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
396 $sql .= " rp.rowid as jobid, rp.ref as jobref, rp.label";
397 $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
398 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid";
399 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
400 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
401 }
402 $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")";
403 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
404 $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
405 }
406 if ($socid) {
407 $sql .= " AND rp.fk_soc = $socid";
408 }
409 $sql .= $db->order("rc.tms", "DESC");
410 $sql .= $db->plimit($max, 0);
411
412 $resql = $db->query($sql);
413 if ($resql) {
414 $num = $db->num_rows($resql);
415 $i = 0;
416
417 print '<div class="div-table-responsive-no-min">';
418 print '<table class="noborder centpercent">';
419 print '<tr class="liste_titre">';
420 print '<th colspan="3">';
421 print $langs->trans("BoxTitleLatestModifiedCandidatures", min($max, $num));
422 print '<a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
423 print '<span class="badge marginleftonlyshort">...</span>';
424 //print img_picto($langs->trans("FullList"), 'recruitmentcandidature');
425 print '</a>';
426 print '</th>';
427 print '<th></th>';
428 print '<th class="right">';
429 print '</th>';
430 print '</tr>';
431 if ($num) {
432 while ($i < $num) {
433 $objp = $db->fetch_object($resql);
434 $staticrecruitmentcandidature->id = $objp->rowid;
435 $staticrecruitmentcandidature->ref = $objp->ref;
436 $staticrecruitmentcandidature->email = $objp->email;
437 $staticrecruitmentcandidature->status = $objp->status;
438 $staticrecruitmentcandidature->date_creation = $objp->date_creation;
439 $staticrecruitmentcandidature->firstname = $objp->firstname;
440 $staticrecruitmentcandidature->lastname = $objp->lastname;
441
442 $staticrecruitmentjobposition->id = $objp->jobid;
443 $staticrecruitmentjobposition->ref = $objp->jobref;
444 $staticrecruitmentjobposition->label = $objp->label;
445
446 print '<tr class="oddeven">';
447 print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
448 print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
449 print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
450 print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms), 'dayreduceformat').'</td>';
451 print '<td class="right nowrap" width="16">';
452 print $staticrecruitmentcandidature->getLibStatut(3);
453 print "</td>";
454 print '</tr>';
455 $i++;
456 }
457
458 $db->free($resql);
459 } else {
460 print '<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
461 }
462 print "</table>";
463 print "</div>";
464 print "<br>";
465 } else {
466 dol_print_error($db);
467 }
468}
469
470print '</div></div></div>';
471
472// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
473$parameters = array('user' => $user);
474$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook
475
476// End of page
477llxFooter();
478$db->close();
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 Trips and Expenses.
Class of the module paid holiday.
Class to manage hooks.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
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).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.