dolibarr  16.0.5
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="'.((int) $year).'">';
65  print '<input type="hidden" name="month" value="'.((int) $month).'">';
66  print '<input type="hidden" name="day" value="'.((int) $day).'">';
67  if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // 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="'.((int) $showbirthday).'">';
71 
72  print '<div class="divsearchfield">';
73  // Type
74  $multiselect = 0;
75  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"
76  $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
77  }
78  print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"');
79  print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500 widthcentpercentminusx');
80  print '</div>';
81 
82  if ($canedit) {
83  // Assigned to user
84  print '<div class="divsearchfield">';
85  print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');
86  print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'minwidth150 maxwidth500 widthcentpercentminusxx');
87  print '</div>';
88 
89  // Assigned to user group
90  print '<div class="divsearchfield">';
91  print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="pictofixedwidth inline-block"');
92  print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'minwidth100 maxwidth500 widthcentpercentminusxx');
93  print '</div>';
94 
95  if (isModEnabled('resource')) {
96  include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
97  $formresource = new FormResource($db);
98 
99  // Resource
100  print '<div class="divsearchfield">';
101  print img_picto($langs->trans("Resource"), 'object_resource', 'class="pictofixedwidth inline-block"');
102  print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
103  print '</div>';
104  }
105  }
106 
107  if (isModEnabled('societe') && !empty($user->rights->societe->lire)) {
108  print '<div class="divsearchfield">';
109  print img_picto($langs->trans("ThirdParty"), 'company', 'class="pictofixedwidth inline-block"');
110  print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, null, 0, 'minwidth100 maxwidth500');
111  print '</div>';
112  }
113 
114  if (isModEnabled('projet') && !empty($user->rights->projet->lire)) {
115  require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
116  $formproject = new FormProjets($db);
117 
118  print '<div class="divsearchfield">';
119  print img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth inline-block"');
120  print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
121  print '</div>';
122  }
123 
124  if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) {
125  // Status
126  print '<div class="divsearchfield">';
127  print img_picto($langs->trans("Status"), 'setup', 'class="pictofixedwidth inline-block"');
128  $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
129  print '</div>';
130  }
131 
132  // Hooks
133  $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
134  $object = null;
135  $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
136 
137  print '<div style="clear:both"></div>';
138 }
139 
140 
147 function show_array_actions_to_do($max = 5)
148 {
149  global $langs, $conf, $user, $db, $socid;
150 
151  $now = dol_now();
152 
153  include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
154  include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
155 
156  $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
157  $sql .= ", c.code, c.libelle as type_label";
158  $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
159  $sql .= ", s.code_client, s.code_compta, s.client";
160  $sql .= ", s.logo, s.email, s.entity";
161  $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
162  $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
163  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
164  if (empty($user->rights->societe->client->voir) && !$socid) {
165  $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
166  }
167  $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
168  $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
169  if (empty($user->rights->societe->client->voir) && !$socid) {
170  $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
171  }
172  if ($socid) {
173  $sql .= " AND s.rowid = ".((int) $socid);
174  }
175  $sql .= " ORDER BY a.datep DESC, a.id DESC";
176  $sql .= $db->plimit($max, 0);
177 
178  $resql = $db->query($sql);
179  if ($resql) {
180  $num = $db->num_rows($resql);
181 
182  print '<div class="div-table-responsive-no-min">';
183  print '<table class="noborder centpercent">';
184  print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
185  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>';
186  print '</tr>';
187 
188  $i = 0;
189 
190  $staticaction = new ActionComm($db);
191  $customerstatic = new Client($db);
192 
193  while ($i < $num) {
194  $obj = $db->fetch_object($resql);
195 
196 
197  print '<tr class="oddeven">';
198 
199  $staticaction->type_code = $obj->code;
200  $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
201  $staticaction->id = $obj->id;
202  print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
203 
204  // print '<td>'.dol_trunc($obj->label,22).'</td>';
205 
206  print '<td>';
207  if ($obj->socid > 0) {
208  $customerstatic->id = $obj->socid;
209  $customerstatic->name = $obj->name;
210  //$customerstatic->name_alias = $obj->name_alias;
211  $customerstatic->code_client = $obj->code_client;
212  $customerstatic->code_compta = $obj->code_compta;
213  $customerstatic->client = $obj->client;
214  $customerstatic->logo = $obj->logo;
215  $customerstatic->email = $obj->email;
216  $customerstatic->entity = $obj->entity;
217  print $customerstatic->getNomUrl(1, '', 40);
218  }
219  print '</td>';
220 
221  $datep = $db->jdate($obj->dp);
222  $datep2 = $db->jdate($obj->dp2);
223 
224  // Date
225  print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
226  $late = 0;
227  if ($obj->percent == 0 && $datep && $datep < time()) {
228  $late = 1;
229  }
230  if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) {
231  $late = 1;
232  }
233  if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) {
234  $late = 1;
235  }
236  if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) {
237  $late = 1;
238  }
239  if ($late) {
240  print img_warning($langs->trans("Late"));
241  }
242  print "</td>";
243 
244  // Statut
245  print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
246 
247  print "</tr>\n";
248 
249  $i++;
250  }
251  print "</table></div><br>";
252 
253  $db->free($resql);
254  } else {
255  dol_print_error($db);
256  }
257 }
258 
259 
267 {
268  global $langs, $conf, $user, $db, $socid;
269 
270  $now = dol_now();
271 
272  $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
273  $sql .= ", c.code, c.libelle";
274  $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
275  $sql .= ", s.code_client, s.code_compta, s.client";
276  $sql .= ", s.logo, s.email, s.entity";
277  $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
278  $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
279  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
280  if (empty($user->rights->societe->client->voir) && !$socid) {
281  $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
282  }
283  $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
284  $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
285  if (empty($user->rights->societe->client->voir) && !$socid) {
286  $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
287  }
288  if ($socid) {
289  $sql .= " AND s.rowid = ".((int) $socid);
290  }
291  $sql .= " ORDER BY a.datep2 DESC";
292  $sql .= $db->plimit($max, 0);
293 
294  $resql = $db->query($sql);
295  if ($resql) {
296  $num = $db->num_rows($resql);
297 
298  print '<div class="div-table-responsive-no-min">';
299  print '<table class="noborder centpercent">';
300  print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
301  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>';
302  print '</tr>';
303 
304  $i = 0;
305 
306  $staticaction = new ActionComm($db);
307  $customerstatic = new Societe($db);
308 
309  while ($i < $num) {
310  $obj = $db->fetch_object($resql);
311 
312 
313  print '<tr class="oddeven">';
314 
315  $staticaction->type_code = $obj->code;
316  $staticaction->libelle = $obj->label;
317  $staticaction->id = $obj->id;
318  print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
319 
320  //print '<td>'.dol_trunc($obj->label,24).'</td>';
321 
322  print '<td>';
323  if ($obj->socid > 0) {
324  $customerstatic->id = $obj->socid;
325  $customerstatic->name = $obj->name;
326  //$customerstatic->name_alias = $obj->name_alias;
327  $customerstatic->code_client = $obj->code_client;
328  $customerstatic->code_compta = $obj->code_compta;
329  $customerstatic->client = $obj->client;
330  $customerstatic->logo = $obj->logo;
331  $customerstatic->email = $obj->email;
332  $customerstatic->entity = $obj->entity;
333  print $customerstatic->getNomUrl(1, '', 30);
334  }
335  print '</td>';
336 
337  // Date
338  print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
339  print "</td>";
340 
341  // Status
342  print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
343 
344  print "</tr>\n";
345  $i++;
346  }
347  // TODO Ajouter rappel pour "il y a des contrats a mettre en service"
348  // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
349  print "</table></div><br>";
350 
351  $db->free($resql);
352  } else {
353  dol_print_error($db);
354  }
355 }
356 
357 
364 {
365  global $langs, $conf, $user;
366  $h = 0;
367  $head = array();
368 
369  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_other.php";
370  $head[$h][1] = $langs->trans("Miscellaneous");
371  $head[$h][2] = 'other';
372  $h++;
373 
374  $head[$h][0] = DOL_URL_ROOT."/admin/agenda.php";
375  $head[$h][1] = $langs->trans("AutoActions");
376  $head[$h][2] = 'autoactions';
377  $h++;
378 
379  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
380  $head[$h][1] = $langs->trans("Reminders");
381  $head[$h][2] = 'reminders';
382  $h++;
383 
384  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
385  $head[$h][1] = $langs->trans("ExportCal");
386  $head[$h][2] = 'xcal';
387  $h++;
388 
389  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php";
390  $head[$h][1] = $langs->trans("ExtSites");
391  $head[$h][2] = 'extsites';
392  $h++;
393 
394  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
395 
396  $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
397  $head[$h][1] = $langs->trans("ExtraFields");
398  $head[$h][2] = 'attributes';
399  $h++;
400 
401  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
402 
403 
404  return $head;
405 }
406 
413 function actions_prepare_head($object)
414 {
415  global $db, $langs, $conf, $user;
416 
417  $h = 0;
418  $head = array();
419 
420  $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id;
421  $head[$h][1] = $langs->trans("CardAction");
422  $head[$h][2] = 'card';
423  $h++;
424 
425  // Tab to link resources
426  if (isModEnabled('resource')) {
427  include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
428  $resource = new DolResource($db);
429 
430  $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
431  $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
432  $nbResources = (is_array($listofresourcelinked) ?count($listofresourcelinked) : 0);
433  $head[$h][1] = $langs->trans("Resources");
434  if ($nbResources > 0) {
435  $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
436  }
437  $head[$h][2] = 'resources';
438  $h++;
439  }
440 
441  // Attached files
442  require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
443  require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
444  $upload_dir = $conf->agenda->dir_output."/".$object->id;
445  $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
446  $nbLinks = Link::count($db, $object->element, $object->id);
447  $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
448  $head[$h][1] = $langs->trans("Documents");
449  if (($nbFiles + $nbLinks) > 0) {
450  $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
451  }
452  $head[$h][2] = 'documents';
453  $h++;
454 
455  $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
456  $head[$h][1] = $langs->trans('Info');
457  $head[$h][2] = 'info';
458  $h++;
459 
460  complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
461 
462  complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
463 
464  return $head;
465 }
466 
467 
474 function calendars_prepare_head($param)
475 {
476  global $langs, $conf, $user;
477 
478  $h = 0;
479  $head = array();
480 
481  $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list'.($param ? '&'.$param : '');
482  $head[$h][1] = $langs->trans("ViewList");
483  $head[$h][2] = 'cardlist';
484  $h++;
485 
486  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_month'.($param ? '&'.$param : '');
487  $head[$h][1] = $langs->trans("ViewCal");
488  $head[$h][2] = 'cardmonth';
489  $h++;
490 
491  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_week'.($param ? '&'.$param : '');
492  $head[$h][1] = $langs->trans("ViewWeek");
493  $head[$h][2] = 'cardweek';
494  $h++;
495 
496  $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_day'.($param ? '&'.$param : '');
497  $head[$h][1] = $langs->trans("ViewDay");
498  $head[$h][2] = 'cardday';
499  $h++;
500 
501  //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
502  if (!empty($conf->global->AGENDA_SHOW_PERTYPE)) {
503  $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : '');
504  $head[$h][1] = $langs->trans("ViewPerType");
505  $head[$h][2] = 'cardpertype';
506  $h++;
507  }
508 
509  $newparam = $param;
510  $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
511  $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($newparam ? '?'.$newparam : '');
512  $head[$h][1] = $langs->trans("ViewPerUser");
513  $head[$h][2] = 'cardperuser';
514  $h++;
515 
516 
517  // Show more tabs from modules
518  // Entries must be declared in modules descriptor with line
519  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
520  // $this->tabs = array('entity:-tabname); to remove a tab
521  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
522 
523  complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
524 
525  return $head;
526 }
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:48
ActionComm
Class to manage agenda events (actions)
Definition: actioncomm.class.php:38
agenda_prepare_head
agenda_prepare_head()
Prepare array with list of tabs.
Definition: agenda.lib.php:363
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
FormActions
Class to manage building of HTML components.
Definition: html.formactions.class.php:30
img_warning
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
Definition: functions.lib.php:4521
FormProjets
Class to manage building of HTML components.
Definition: html.formprojet.class.php:30
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
calendars_prepare_head
calendars_prepare_head($param)
Define head array for tabs of agenda setup pages.
Definition: agenda.lib.php:474
dol_dir_list
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
complete_head_from_modules
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add')
Complete or removed entries into a head array (used to build tabs).
Definition: functions.lib.php:9038
print_actions_filter
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
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
$formactions
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.
Definition: agenda_other.php:178
actions_prepare_head
actions_prepare_head($object)
Prepare array with list of tabs.
Definition: agenda.lib.php:413
show_array_last_actions_done
show_array_last_actions_done($max=5)
Show last actions array.
Definition: agenda.lib.php:266
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
show_array_actions_to_do
show_array_actions_to_do($max=5)
Show actions to do array.
Definition: agenda.lib.php:147
FormResource
Class to manage forms for the module resource.
Definition: html.formresource.class.php:36
Client
Class to manage customers or prospects.
Definition: client.class.php:31