dolibarr  13.0.2
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  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  * or see https://www.gnu.org/
19  */
20 
50 function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '', $excludetype = '', $resourceid = 0)
51 {
52  global $conf, $user, $langs, $db, $hookmanager;
53  global $begin_h, $end_h, $begin_d, $end_d;
54  global $massaction;
55 
56  $langs->load("companies");
57 
58  include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
59  $formactions = new FormActions($db);
60 
61  // Filters
62  //print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
63  print '<input type="hidden" name="token" value="'.newToken().'">';
64  print '<input type="hidden" name="year" value="'.$year.'">';
65  print '<input type="hidden" name="month" value="'.$month.'">';
66  print '<input type="hidden" name="day" value="'.$day.'">';
67  if ($massaction != 'predelete') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
68  print '<input type="hidden" name="action" value="'.$action.'">';
69  }
70  print '<input type="hidden" name="search_showbirthday" value="'.$showbirthday.'">';
71 
72  if ($canedit)
73  {
74  print '<div class="divsearchfield">';
75  // Type
76  print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
77  print '<span class="hideonsmartphone">'.$langs->trans("Type").'</span>';
78  $multiselect = 0;
79  if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
80  {
81  $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
82  }
83  print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500');
84  print '</div>';
85 
86  // Assigned to
87  print '<div class="divsearchfield">';
88  print img_picto('', 'user', 'class="fawidth30 inline-block"');
89  print '<span class="hideonsmartphone">'.$langs->trans("ActionsToDoBy").'</span>';
90  print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500 widthcentpercentminusxx');
91  print '</div>';
92  print '<div class="divsearchfield">';
93  print img_picto('', 'object_group', 'class="fawidth30 inline-block"');
94  print '<span class="hideonsmartphone">'.$langs->trans("ToUserOfGroup").'</span>';
95  print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
96  print '</div>';
97 
98  if ($conf->resource->enabled)
99  {
100  include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
101  $formresource = new FormResource($db);
102 
103  // Resource
104  print '<div class="divsearchfield">';
105  print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
106  print '<span class="hideonsmartphone">'.$langs->trans("Resource").'</span>';
107  print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
108  print '</div>';
109  }
110  }
111 
112  if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
113  {
114  print '<div class="divsearchfield">';
115  print img_picto('', 'company', 'class="fawidth30 inline-block"');
116  print '<span class="hideonsmartphone">'.$langs->trans("ThirdParty").'</span>';
117  print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, null, 0, 'minwidth100 maxwidth500');
118  print '</div>';
119  }
120 
121  if (!empty($conf->projet->enabled) && $user->rights->projet->lire)
122  {
123  require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
124  $formproject = new FormProjets($db);
125 
126  print '<div class="divsearchfield">';
127  print img_picto('', 'project', 'class="fawidth30 inline-block"');
128  print '<span class="hideonsmartphone">'.$langs->trans("Project").'</span>';
129  print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
130  print '</div>';
131  }
132 
133  if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"]))
134  {
135  // Status
136  print '<div class="divsearchfield">';
137  print img_picto('', 'setup', 'class="fawidth30 inline-block"');
138  print '<span class="hideonsmartphone">'.$langs->trans("Status").'</span>';
139  $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
140  print '</div>';
141  }
142 
143  // Hooks
144  $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
145  $object = null;
146  $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
147 
148  print '<div style="clear:both"></div>';
149 }
150 
151 
158 function show_array_actions_to_do($max = 5)
159 {
160  global $langs, $conf, $user, $db, $socid;
161 
162  $now = dol_now();
163 
164  include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
165  include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
166 
167  $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
168  $sql .= ", c.code, c.libelle as type_label";
169  $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
170  $sql .= ", s.code_client, s.code_compta, s.client";
171  $sql .= ", s.logo, s.email, s.entity";
172  $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
173  $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
174  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
175  if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
176  $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
177  $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
178  if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
179  if ($socid) $sql .= " AND s.rowid = ".$socid;
180  $sql .= " ORDER BY a.datep DESC, a.id DESC";
181  $sql .= $db->plimit($max, 0);
182 
183  $resql = $db->query($sql);
184  if ($resql)
185  {
186  $num = $db->num_rows($resql);
187 
188  print '<div class="div-table-responsive-no-min">';
189  print '<table class="noborder centpercent">';
190  print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
191  print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&status=todo">'.$langs->trans("FullList").'</a></th>';
192  print '</tr>';
193 
194  $i = 0;
195 
196  $staticaction = new ActionComm($db);
197  $customerstatic = new Client($db);
198 
199  while ($i < $num)
200  {
201  $obj = $db->fetch_object($resql);
202 
203 
204  print '<tr class="oddeven">';
205 
206  $staticaction->type_code = $obj->code;
207  $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
208  $staticaction->id = $obj->id;
209  print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
210 
211  // print '<td>'.dol_trunc($obj->label,22).'</td>';
212 
213  print '<td>';
214  if ($obj->socid > 0)
215  {
216  $customerstatic->id = $obj->socid;
217  $customerstatic->name = $obj->name;
218  //$customerstatic->name_alias = $obj->name_alias;
219  $customerstatic->code_client = $obj->code_client;
220  $customerstatic->code_compta = $obj->code_compta;
221  $customerstatic->client = $obj->client;
222  $customerstatic->logo = $obj->logo;
223  $customerstatic->email = $obj->email;
224  $customerstatic->entity = $obj->entity;
225  print $customerstatic->getNomUrl(1, '', 40);
226  }
227  print '</td>';
228 
229  $datep = $db->jdate($obj->dp);
230  $datep2 = $db->jdate($obj->dp2);
231 
232  // Date
233  print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
234  $late = 0;
235  if ($obj->percent == 0 && $datep && $datep < time()) $late = 1;
236  if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) $late = 1;
237  if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) $late = 1;
238  if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) $late = 1;
239  if ($late) print img_warning($langs->trans("Late"));
240  print "</td>";
241 
242  // Statut
243  print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
244 
245  print "</tr>\n";
246 
247  $i++;
248  }
249  print "</table></div><br>";
250 
251  $db->free($resql);
252  } else {
253  dol_print_error($db);
254  }
255 }
256 
257 
265 {
266  global $langs, $conf, $user, $db, $socid;
267 
268  $now = dol_now();
269 
270  $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
271  $sql .= ", c.code, c.libelle";
272  $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
273  $sql .= ", s.code_client, s.code_compta, s.client";
274  $sql .= ", s.logo, s.email, s.entity";
275  $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
276  $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
277  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
278  if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
279  $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
280  $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
281  if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
282  if ($socid) $sql .= " AND s.rowid = ".$socid;
283  $sql .= " ORDER BY a.datep2 DESC";
284  $sql .= $db->plimit($max, 0);
285 
286  $resql = $db->query($sql);
287  if ($resql)
288  {
289  $num = $db->num_rows($resql);
290 
291  print '<div class="div-table-responsive-no-min">';
292  print '<table class="noborder centpercent">';
293  print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
294  print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&status=done">'.$langs->trans("FullList").'</a></th>';
295  print '</tr>';
296 
297  $i = 0;
298 
299  $staticaction = new ActionComm($db);
300  $customerstatic = new Societe($db);
301 
302  while ($i < $num)
303  {
304  $obj = $db->fetch_object($resql);
305 
306 
307  print '<tr class="oddeven">';
308 
309  $staticaction->type_code = $obj->code;
310  $staticaction->libelle = $obj->label;
311  $staticaction->id = $obj->id;
312  print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
313 
314  //print '<td>'.dol_trunc($obj->label,24).'</td>';
315 
316  print '<td>';
317  if ($obj->socid > 0)
318  {
319  $customerstatic->id = $obj->socid;
320  $customerstatic->name = $obj->name;
321  //$customerstatic->name_alias = $obj->name_alias;
322  $customerstatic->code_client = $obj->code_client;
323  $customerstatic->code_compta = $obj->code_compta;
324  $customerstatic->client = $obj->client;
325  $customerstatic->logo = $obj->logo;
326  $customerstatic->email = $obj->email;
327  $customerstatic->entity = $obj->entity;
328  print $customerstatic->getNomUrl(1, '', 30);
329  }
330  print '</td>';
331 
332  // Date
333  print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
334  print "</td>";
335 
336  // Status
337  print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
338 
339  print "</tr>\n";
340  $i++;
341  }
342  // TODO Ajouter rappel pour "il y a des contrats a mettre en service"
343  // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
344  print "</table></div><br>";
345 
346  $db->free($resql);
347  } else {
348  dol_print_error($db);
349  }
350 }
351 
352 
359 {
360  global $langs, $conf, $user;
361  $h = 0;
362  $head = array();
363 
364  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php";
365  $head[$h][1] = $langs->trans("Miscellaneous");
366  $head[$h][2] = 'other';
367  $h++;
368 
369  $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php";
370  $head[$h][1] = $langs->trans("AutoActions");
371  $head[$h][2] = 'autoactions';
372  $h++;
373 
374  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
375  $head[$h][1] = $langs->trans("Reminders");
376  $head[$h][2] = 'reminders';
377  $h++;
378 
379  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
380  $head[$h][1] = $langs->trans("ExportCal");
381  $head[$h][2] = 'xcal';
382  $h++;
383 
384  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php";
385  $head[$h][1] = $langs->trans("ExtSites");
386  $head[$h][2] = 'extsites';
387  $h++;
388 
389  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
390 
391  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
392  $head[$h][1] = $langs->trans("ExtraFields");
393  $head[$h][2] = 'attributes';
394  $h++;
395 
396  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
397 
398 
399  return $head;
400 }
401 
408 function actions_prepare_head($object)
409 {
410  global $db, $langs, $conf, $user;
411 
412  $h = 0;
413  $head = array();
414 
415  $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id;
416  $head[$h][1] = $langs->trans("CardAction");
417  $head[$h][2] = 'card';
418  $h++;
419 
420  // Tab to link resources
421  if ($conf->resource->enabled)
422  {
423  include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
424  $resource = new DolResource($db);
425 
426  $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
427  $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
428  $nbResources = (is_array($listofresourcelinked) ?count($listofresourcelinked) : 0);
429  $head[$h][1] = $langs->trans("Resources");
430  if ($nbResources > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
431  $head[$h][2] = 'resources';
432  $h++;
433  }
434 
435  // Attached files
436  require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
437  require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
438  $upload_dir = $conf->agenda->dir_output."/".$object->id;
439  $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
440  $nbLinks = Link::count($db, $object->element, $object->id);
441  $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
442  $head[$h][1] = $langs->trans("Documents");
443  if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
444  $head[$h][2] = 'documents';
445  $h++;
446 
447  $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
448  $head[$h][1] = $langs->trans('Info');
449  $head[$h][2] = 'info';
450  $h++;
451 
452  complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
453 
454  complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
455 
456  return $head;
457 }
458 
459 
466 function calendars_prepare_head($param)
467 {
468  global $langs, $conf, $user;
469 
470  $h = 0;
471  $head = array();
472 
473  $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?action=show_list'.($param ? '&'.$param : '');
474  $head[$h][1] = $langs->trans("ViewList");
475  $head[$h][2] = 'cardlist';
476  $h++;
477 
478  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_month'.($param ? '&'.$param : '');
479  $head[$h][1] = $langs->trans("ViewCal");
480  $head[$h][2] = 'cardmonth';
481  $h++;
482 
483  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_week'.($param ? '&'.$param : '');
484  $head[$h][1] = $langs->trans("ViewWeek");
485  $head[$h][2] = 'cardweek';
486  $h++;
487 
488  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_day'.($param ? '&'.$param : '');
489  $head[$h][1] = $langs->trans("ViewDay");
490  $head[$h][2] = 'cardday';
491  $h++;
492 
493  //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
494  if (!empty($conf->global->AGENDA_SHOW_PERTYPE))
495  {
496  $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : '');
497  $head[$h][1] = $langs->trans("ViewPerType");
498  $head[$h][2] = 'cardpertype';
499  $h++;
500  }
501 
502  $newparam = $param;
503  $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
504  $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($newparam ? '?'.$newparam : '');
505  $head[$h][1] = $langs->trans("ViewPerUser");
506  $head[$h][2] = 'cardperuser';
507  $h++;
508 
509 
510  // Show more tabs from modules
511  // Entries must be declared in modules descriptor with line
512  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
513  // $this->tabs = array('entity:-tabname); to remove a tab
514  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
515 
516  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
517 
518  return $head;
519 }
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action== 'set') elseif($action== 'specimen') elseif($action== 'setmodel') elseif($action== 'del') elseif($action== 'setdoc') $formactions
View.
Class to manage building of HTML components.
Class to manage agenda events (actions)
agenda_prepare_head()
Prepare array with list of tabs.
Definition: agenda.lib.php:358
dol_now($mode= 'auto')
Return date for now.
calendars_prepare_head($param)
Define head array for tabs of agenda setup pages.
Definition: agenda.lib.php:466
Class to manage customers or prospects.
Classe permettant la gestion des formulaire du module resource.
actions_prepare_head($object)
Prepare array with list of tabs.
Definition: agenda.lib.php:408
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage building of HTML components.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it&#39;s its name (generic function)
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode= '', $usergroupid= '', $excludetype= '', $resourceid=0)
Show filter form in agenda view.
Definition: agenda.lib.php:50
show_array_last_actions_done($max=5)
Show last actions array.
Definition: agenda.lib.php:264
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
Definition: files.lib.php:60
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Definition: index.php:89
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
show_array_actions_to_do($max=5)
Show actions to do array.
Definition: agenda.lib.php:158
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).