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