dolibarr 21.0.0-alpha
agenda.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
5 * Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
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 * or see https://www.gnu.org/
20 */
21
53 $form,
54 $canedit,
55 $status,
56 $year,
57 $month,
58 $day,
59 $showbirthday,
60 $filtera,
61 $filtert,
62 $filtered,
63 $pid,
64 $socid,
65 $action,
66 $showextcals = array(),
67 $actioncode = '',
68 $usergroupid = 0,
69 $excludetype = '',
70 $resourceid = 0,
71 $search_categ_cus = 0
72) {
73 global $user, $langs, $db, $hookmanager;
74 global $massaction;
75
76 $langs->load("companies");
77
78 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
79 $formactions = new FormActions($db);
80
81 // Filters
82 //print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
83 print '<input type="hidden" name="token" value="'.newToken().'">';
84 print '<input type="hidden" name="year" value="'.((int) $year).'">';
85 print '<input type="hidden" name="month" value="'.((int) $month).'">';
86 print '<input type="hidden" name="day" value="'.((int) $day).'">';
87 if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
88 print '<input type="hidden" name="action" value="'.$action.'">';
89 }
90 print '<input type="hidden" name="search_showbirthday" value="'.((int) $showbirthday).'">';
91
92 print '<div class="divsearchfield">';
93 // Type
94 $multiselect = 0;
95 if (getDolGlobalString('MAIN_ENABLE_MULTISELECT_TYPE')) { // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
96 $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE'));
97 }
98 print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"');
99 print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : -1), 0, $multiselect, 0, 'minwidth200 maxwidth250 widthcentpercentminusx');
100 print '</div>';
101
102 if ($canedit) {
103 // Assigned to user
104 print '<div class="divsearchfield">';
105 print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');
106 print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'minwidth100 maxwidth250 widthcentpercentminusx');
107 print '</div>';
108
109 // Assigned to user group
110 print '<div class="divsearchfield">';
111 print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="pictofixedwidth inline-block"');
112 print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'minwidth100 maxwidth250 widthcentpercentminusx');
113 print '</div>';
114
115 if (isModEnabled('resource')) {
116 include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
117 $formresource = new FormResource($db);
118
119 // Resource
120 print '<div class="divsearchfield">';
121 print img_picto($langs->trans("Resource"), 'object_resource', 'class="pictofixedwidth inline-block"');
122 print $formresource->select_resource_list($resourceid, "search_resourceid", [], 1, 0, 0, [], [], 2, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
123 print '</div>';
124 }
125 }
126
127 if (isModEnabled('societe') && $user->hasRight('societe', 'lire')) {
128 print '<div class="divsearchfield">';
129 print img_picto($langs->trans("ThirdParty"), 'company', 'class="pictofixedwidth inline-block"');
130 print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, null, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
131 print '</div>';
132 }
133
134 if (isModEnabled('project') && $user->hasRight('projet', 'lire')) {
135 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
136 $formproject = new FormProjets($db);
137
138 print '<div class="divsearchfield">';
139 print img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth inline-block"');
140 print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
141 print '</div>';
142 }
143
144 if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
145 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
146 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
147 $formother = new FormOther($db);
148 $langs->load('categories');
149
150 print '<div class="divsearchfield">';
151 print img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
152 print $formother->select_categories('actioncomm', $search_categ_cus, 'search_categ_cus', 1, $langs->trans('ActionCommCategoriesArea'), 'minwidth100 maxwidth250 widthcentpercentminusx');
153 print '</div>';
154 }
155
156 if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) {
157 // Status
158 print '<div class="divsearchfield">';
159 print img_picto($langs->trans("Status"), 'status', 'class="pictofixedwidth inline-block"');
160 $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
161 print '</div>';
162 }
163
164 // Hooks
165 $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
166 $object = null;
167 $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
168
169 print '<div class="clearboth"></div>';
170}
171
172
179function show_array_actions_to_do($max = 5)
180{
181 global $langs, $conf, $user, $db, $socid;
182
183 $now = dol_now();
184
185 include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
186 include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
187
188 $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
189 $sql .= ", c.code, c.libelle as type_label";
190 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
191 $sql .= ", s.code_client, s.code_compta, s.client";
192 $sql .= ", s.logo, s.email, s.entity";
193 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
194 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
195 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
196 if (!$user->hasRight('societe', 'client', 'voir')) {
197 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
198 }
199 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
200 $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
201 if (!$user->hasRight('societe', 'client', 'voir')) {
202 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
203 }
204 if ($socid) {
205 $sql .= " AND s.rowid = ".((int) $socid);
206 }
207 $sql .= " ORDER BY a.datep DESC, a.id DESC";
208 $sql .= $db->plimit($max, 0);
209
210 $resql = $db->query($sql);
211 if ($resql) {
212 $num = $db->num_rows($resql);
213
214 print '<div class="div-table-responsive-no-min">';
215 print '<table class="noborder centpercent">';
216 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
217 print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&status=todo">'.$langs->trans("FullList").'</a></th>';
218 print '</tr>';
219
220 $i = 0;
221
222 $staticaction = new ActionComm($db);
223 $customerstatic = new Client($db);
224
225 while ($i < $num) {
226 $obj = $db->fetch_object($resql);
227
228
229 print '<tr class="oddeven">';
230
231 $staticaction->type_code = $obj->code;
232 $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
233 $staticaction->id = $obj->id;
234 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
235
236 // print '<td>'.dol_trunc($obj->label,22).'</td>';
237
238 print '<td>';
239 if ($obj->socid > 0) {
240 $customerstatic->id = $obj->socid;
241 $customerstatic->name = $obj->name;
242 //$customerstatic->name_alias = $obj->name_alias;
243 $customerstatic->code_client = $obj->code_client;
244 $customerstatic->code_compta = $obj->code_compta;
245 $customerstatic->client = $obj->client;
246 $customerstatic->logo = $obj->logo;
247 $customerstatic->email = $obj->email;
248 $customerstatic->entity = $obj->entity;
249 print $customerstatic->getNomUrl(1, '', 40);
250 }
251 print '</td>';
252
253 $datep = $db->jdate($obj->dp);
254 $datep2 = $db->jdate($obj->dp2);
255
256 // Date
257 print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
258 $late = 0;
259 if ($obj->percent == 0 && $datep && $datep < time()) {
260 $late = 1;
261 }
262 if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) {
263 $late = 1;
264 }
265 if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) {
266 $late = 1;
267 }
268 if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) {
269 $late = 1;
270 }
271 if ($late) {
272 print img_warning($langs->trans("Late"));
273 }
274 print "</td>";
275
276 // Statut
277 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
278
279 print "</tr>\n";
280
281 $i++;
282 }
283 print "</table></div><br>";
284
285 $db->free($resql);
286 } else {
287 dol_print_error($db);
288 }
289}
290
291
299{
300 global $langs, $conf, $user, $db, $socid;
301
302 $now = dol_now();
303
304 $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
305 $sql .= ", c.code, c.libelle";
306 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
307 $sql .= ", s.code_client, s.code_compta, s.client";
308 $sql .= ", s.logo, s.email, s.entity";
309 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
310 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
311 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
312 if (!$user->hasRight('societe', 'client', 'voir')) {
313 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
314 }
315 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
316 $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
317 if (!$user->hasRight('societe', 'client', 'voir')) {
318 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
319 }
320 if ($socid) {
321 $sql .= " AND s.rowid = ".((int) $socid);
322 }
323 $sql .= " ORDER BY a.datep2 DESC";
324 $sql .= $db->plimit($max, 0);
325
326 $resql = $db->query($sql);
327 if ($resql) {
328 $num = $db->num_rows($resql);
329
330 print '<div class="div-table-responsive-no-min">';
331 print '<table class="noborder centpercent">';
332 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
333 print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&status=done">'.$langs->trans("FullList").'</a></th>';
334 print '</tr>';
335
336 $i = 0;
337
338 $staticaction = new ActionComm($db);
339 $customerstatic = new Societe($db);
340
341 while ($i < $num) {
342 $obj = $db->fetch_object($resql);
343
344
345 print '<tr class="oddeven">';
346
347 $staticaction->type_code = $obj->code;
348 $staticaction->label = $obj->label;
349 $staticaction->id = $obj->id;
350 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
351
352 //print '<td>'.dol_trunc($obj->label,24).'</td>';
353
354 print '<td>';
355 if ($obj->socid > 0) {
356 $customerstatic->id = $obj->socid;
357 $customerstatic->name = $obj->name;
358 //$customerstatic->name_alias = $obj->name_alias;
359 $customerstatic->code_client = $obj->code_client;
360 $customerstatic->code_compta = $obj->code_compta;
361 $customerstatic->client = $obj->client;
362 $customerstatic->logo = $obj->logo;
363 $customerstatic->email = $obj->email;
364 $customerstatic->entity = $obj->entity;
365 print $customerstatic->getNomUrl(1, '', 30);
366 }
367 print '</td>';
368
369 // Date
370 print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
371 print "</td>";
372
373 // Status
374 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
375
376 print "</tr>\n";
377 $i++;
378 }
379 // TODO Ajouter rappel pour "il y a des contrats a mettre en service"
380 // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
381 print "</table></div><br>";
382
383 $db->free($resql);
384 } else {
385 dol_print_error($db);
386 }
387}
388
389
396{
397 global $langs, $conf, $user, $db;
398
399 $extrafields = new ExtraFields($db);
400 $extrafields->fetch_name_optionals_label('actioncomm');
401
402 $h = 0;
403 $head = array();
404
405 $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php";
406 $head[$h][1] = $langs->trans("Miscellaneous");
407 $head[$h][2] = 'other';
408 $h++;
409
410 $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php";
411 $head[$h][1] = $langs->trans("AutoActions");
412 $head[$h][2] = 'autoactions';
413 $h++;
414
415 $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
416 $head[$h][1] = $langs->trans("Reminders");
417 $head[$h][2] = 'reminders';
418 $h++;
419
420 $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
421 $head[$h][1] = $langs->trans("ExportCal");
422 $head[$h][2] = 'xcal';
423 $h++;
424
425 $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php";
426 $head[$h][1] = $langs->trans("ExtSites");
427 $head[$h][2] = 'extsites';
428 $h++;
429
430 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
431
432 $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
433 $head[$h][1] = $langs->trans("ExtraFields");
434 $nbExtrafields = $extrafields->attributes['actioncomm']['count'];
435 if ($nbExtrafields > 0) {
436 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
437 }
438 $head[$h][2] = 'attributes';
439 $h++;
440
441 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
442
443
444 return $head;
445}
446
454{
455 global $db, $langs, $conf, $user;
456
457 $h = 0;
458 $head = array();
459
460 $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id;
461 $head[$h][1] = $langs->trans("CardAction");
462 $head[$h][2] = 'card';
463 $h++;
464
465 // Tab to link resources
466 if (isModEnabled('resource')) {
467 include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
468 $resource = new Dolresource($db);
469
470 $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
471 $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
472 $nbResources = (is_array($listofresourcelinked) ? count($listofresourcelinked) : 0);
473 $head[$h][1] = $langs->trans("Resources");
474 if ($nbResources > 0) {
475 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
476 }
477 $head[$h][2] = 'resources';
478 $h++;
479 }
480
481 // Attached files
482 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
483 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
484 $upload_dir = $conf->agenda->dir_output."/".$object->id;
485 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
486 $nbLinks = Link::count($db, $object->element, $object->id);
487 $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
488 $head[$h][1] = $langs->trans("Documents");
489 if (($nbFiles + $nbLinks) > 0) {
490 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
491 }
492 $head[$h][2] = 'documents';
493 $h++;
494
495 $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
496 $head[$h][1] = $langs->trans('Info');
497 $head[$h][2] = 'info';
498 $h++;
499
500 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
501
502 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
503
504 return $head;
505}
506
507
515{
516 global $langs, $conf, $user;
517
518 $h = 0;
519 $head = array();
520
521 $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list'.($param ? '&'.$param : '');
522 $head[$h][1] = $langs->trans("ViewList");
523 $head[$h][2] = 'cardlist';
524 $h++;
525
526 $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_month'.($param ? '&'.$param : '');
527 $head[$h][1] = $langs->trans("ViewCal");
528 $head[$h][2] = 'cardmonth';
529 $h++;
530
531 $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_week'.($param ? '&'.$param : '');
532 $head[$h][1] = $langs->trans("ViewWeek");
533 $head[$h][2] = 'cardweek';
534 $h++;
535
536 $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_day'.($param ? '&'.$param : '');
537 $head[$h][1] = $langs->trans("ViewDay");
538 $head[$h][2] = 'cardday';
539 $h++;
540
541 //if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
542 if (getDolGlobalString('AGENDA_SHOW_PERTYPE')) {
543 $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : '');
544 $head[$h][1] = $langs->trans("ViewPerType");
545 $head[$h][2] = 'cardpertype';
546 $h++;
547 }
548
549 $newparam = $param;
550 $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
551 $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($newparam ? '?'.$newparam : '');
552 $head[$h][1] = $langs->trans("ViewPerUser");
553 $head[$h][2] = 'cardperuser';
554 $h++;
555
556
557 // Show more tabs from modules
558 // Entries must be declared in modules descriptor with line
559 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
560 // $this->tabs = array('entity:-tabname); to remove a tab
561 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
562
563 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
564
565 return $head;
566}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
show_array_actions_to_do($max=5)
Show actions to do array.
print_actions_filter( $form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filtered, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid=0, $excludetype='', $resourceid=0, $search_categ_cus=0)
Show filter form in agenda view.
show_array_last_actions_done($max=5)
Show last actions array.
calendars_prepare_head($param)
Define head array for tabs of agenda setup pages.
agenda_prepare_head()
Prepare array with list of tabs.
actions_prepare_head($object)
Prepare array with list of tabs.
Class to manage agenda events (actions)
Class to manage customers or prospects.
DAO Resource object.
Class to manage standard extra fields.
Class to manage building of HTML components.
Class permettant la generation de composants html autre Only common components are here.
Class to manage building of HTML components.
Class to manage forms for the module resource.
Class to manage third parties objects (customers, suppliers, prospects...)
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:63
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)
dol_now($mode='auto')
Return date for now.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.