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