27require
"../main.inc.php";
28require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
35if (isModEnabled(
'category')) {
36 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
40$langsLoad = array(
'projects',
'users',
'companies');
41if (isModEnabled(
'eventorganization')) {
42 $langsLoad[] =
'eventorganization';
45$langs->loadLangs($langsLoad);
47$action =
GETPOST(
'action',
'aZ09');
48$massaction =
GETPOST(
'massaction',
'alpha');
50$confirm =
GETPOST(
'confirm',
'alpha');
51$cancel =
GETPOST(
'cancel',
'aZ09');
52$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'projecttasklist';
53$backtopage =
GETPOST(
'backtopage',
'alpha');
56$optioncss =
GETPOST(
'optioncss',
'aZ');
57$backtopage =
GETPOST(
'backtopage',
'alpha');
58$toselect =
GETPOST(
'toselect',
'array');
62$taskref =
GETPOST(
'taskref',
'alpha');
66$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
67$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
69if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
72$offset = $limit * $page;
77$search_taskref =
GETPOST(
'search_taskref');
78$search_tasklabel =
GETPOST(
'search_tasklabel');
79$search_taskdescription =
GETPOST(
'search_taskdescription');
80$search_dtstartday =
GETPOST(
'search_dtstartday');
81$search_dtstartmonth =
GETPOST(
'search_dtstartmonth');
82$search_dtstartyear =
GETPOST(
'search_dtstartyear');
83$search_dtendday =
GETPOST(
'search_dtendday');
84$search_dtendmonth =
GETPOST(
'search_dtendmonth');
85$search_dtendyear =
GETPOST(
'search_dtendyear');
86$search_planedworkload =
GETPOST(
'search_planedworkload');
87$search_timespend =
GETPOST(
'search_timespend');
88$search_progresscalc =
GETPOST(
'search_progresscalc');
89$search_progressdeclare =
GETPOST(
'search_progressdeclare');
90$search_task_budget_amount =
GETPOST(
'search_task_budget_amount');
92$search_date_start_startmonth =
GETPOSTINT(
'search_date_start_startmonth');
93$search_date_start_startyear =
GETPOSTINT(
'search_date_start_startyear');
94$search_date_start_startday =
GETPOSTINT(
'search_date_start_startday');
95$search_date_start_start =
dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear);
96$search_date_start_endmonth =
GETPOSTINT(
'search_date_start_endmonth');
97$search_date_start_endyear =
GETPOSTINT(
'search_date_start_endyear');
98$search_date_start_endday =
GETPOSTINT(
'search_date_start_endday');
99$search_date_start_end =
dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear);
101$search_date_end_startmonth =
GETPOSTINT(
'search_date_end_startmonth');
102$search_date_end_startyear =
GETPOSTINT(
'search_date_end_startyear');
103$search_date_end_startday =
GETPOSTINT(
'search_date_end_startday');
104$search_date_end_start =
dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear);
105$search_date_end_endmonth =
GETPOSTINT(
'search_date_end_endmonth');
106$search_date_end_endyear =
GETPOSTINT(
'search_date_end_endyear');
107$search_date_end_endday =
GETPOSTINT(
'search_date_end_endday');
108$search_date_end_end =
dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear);
113$taskstatic =
new Task($db);
116include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
117if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object,
'fetchComments') && empty(
$object->comments)) {
121if ($id > 0 || !empty($ref)) {
123 $extrafields->fetch_name_optionals_label(
$object->table_element);
125$extrafields->fetch_name_optionals_label($taskstatic->table_element);
126$search_array_options = $extrafields->getOptionalsFromPost($taskstatic->table_element,
'',
'search_');
143$diroutputmassaction = $conf->project->dir_output.
'/tasks/temp/massgeneration/'.$user->id;
146$hookmanager->initHooks(array(
'projecttaskscard',
'globalcard'));
150$label =
GETPOST(
'label',
'alpha');
151$description =
GETPOST(
'description',
'restricthtml');
152$planned_workloadhour = (GETPOSTISSET(
'planned_workloadhour') ?
GETPOSTINT(
'planned_workloadhour') :
'');
153$planned_workloadmin = (GETPOSTISSET(
'planned_workloadmin') ?
GETPOSTINT(
'planned_workloadmin') :
'');
154if (GETPOSTISSET(
'planned_workloadhour') || GETPOSTISSET(
'planned_workloadmin')) {
155 $planned_workload = (int) $planned_workloadhour * 3600 + (
int) $planned_workloadmin * 60;
157 $planned_workload =
'';
162 't.ref' => array(
'label' =>
"RefTask",
'checked' => 1,
'position' => 1),
163 't.label' => array(
'label' =>
"LabelTask",
'checked' => 1,
'position' => 2),
164 't.description' => array(
'label' =>
"Description",
'checked' => 0,
'position' => 3),
165 't.dateo' => array(
'label' =>
"DateStart",
'checked' => 1,
'position' => 4),
166 't.datee' => array(
'label' =>
"Deadline",
'checked' => 1,
'position' => 5),
167 't.planned_workload' => array(
'label' =>
"PlannedWorkload",
'checked' => 1,
'position' => 6),
168 't.duration_effective' => array(
'label' =>
"TimeSpent",
'checked' => 1,
'position' => 7),
169 't.progress_calculated' => array(
'label' =>
"ProgressCalculated",
'checked' => 1,
'position' => 8),
170 't.progress' => array(
'label' =>
"ProgressDeclared",
'checked' => 1,
'position' => 9),
171 't.progress_summary' => array(
'label' =>
"TaskProgressSummary",
'checked' => 1,
'position' => 10),
172 't.budget_amount' => array(
'label' =>
"Budget",
'checked' => 0,
'position' => 11),
173 'c.assigned' => array(
'label' =>
"TaskRessourceLinks",
'checked' => 1,
'position' => 12),
176 $arrayfields[
't.tobill'] = array(
'label' => $langs->trans(
"TimeToBill"),
'checked' => 0,
'position' => 11);
177 $arrayfields[
't.billed'] = array(
'label' => $langs->trans(
"TimeBilled"),
'checked' => 0,
'position' => 12);
181$extrafieldsobjectkey = $taskstatic->table_element;
182$extrafieldsobjectprefix =
'efpt.';
183include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
186'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
188$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
196 if (!empty($backtopageforcancel)) {
197 header(
"Location: ".$backtopageforcancel);
199 } elseif (!empty($backtopage)) {
200 header(
"Location: ".$backtopage);
206if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
210$parameters = array(
'id' => $id);
211$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
216if (empty($reshook)) {
218 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
221 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
222 $search_user_id =
"";
223 $search_taskref =
'';
224 $search_tasklabel =
'';
225 $search_dtstartday =
'';
226 $search_dtstartmonth =
'';
227 $search_dtstartyear =
'';
228 $search_dtendday =
'';
229 $search_dtendmonth =
'';
230 $search_dtendyear =
'';
231 $search_planedworkload =
'';
232 $search_timespend =
'';
233 $search_progresscalc =
'';
234 $search_progressdeclare =
'';
235 $search_task_budget_amount =
'';
237 $search_array_options = array();
238 $search_date_start_startmonth =
"";
239 $search_date_start_startyear =
"";
240 $search_date_start_startday =
"";
241 $search_date_start_start =
"";
242 $search_date_start_endmonth =
"";
243 $search_date_start_endyear =
"";
244 $search_date_start_endday =
"";
245 $search_date_start_end =
"";
246 $search_date_end_startmonth =
"";
247 $search_date_end_startyear =
"";
248 $search_date_end_startday =
"";
249 $search_date_end_start =
"";
250 $search_date_end_endmonth =
"";
251 $search_date_end_endyear =
"";
252 $search_date_end_endday =
"";
253 $search_date_end_end =
"";
257 $objectclass =
'Task';
258 $objectlabel =
'Tasks';
259 $permissiontoread = $user->hasRight(
'projet',
'lire');
260 $permissiontodelete = $user->hasRight(
'projet',
'supprimer');
261 $uploaddir = $conf->project->dir_output.
'/tasks';
262 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
265$morewherefilterarray = array();
267if (!empty($search_taskref)) {
268 $morewherefilterarray[] =
natural_search(
't.ref', $search_taskref, 0, 1);
271if (!empty($search_tasklabel)) {
272 $morewherefilterarray[] =
natural_search(
't.label', $search_tasklabel, 0, 1);
275$moresql =
dolSqlDateFilter(
't.dateo', $search_dtstartday, $search_dtstartmonth, $search_dtstartyear, 1);
277 $morewherefilterarray[] = $moresql;
280$moresql =
dolSqlDateFilter(
't.datee', $search_dtendday, $search_dtendmonth, $search_dtendyear, 1);
282 $morewherefilterarray[] = $moresql;
285if ($search_date_start_start) {
286 $morewherefilterarray[] =
" t.dateo >= '".$db->idate($search_date_start_start).
"'";
288if ($search_date_start_end) {
289 $morewherefilterarray[] =
" t.dateo <= '".$db->idate($search_date_start_end).
"'";
292if ($search_date_end_start) {
293 $morewherefilterarray[] =
" t.datee >= '".$db->idate($search_date_end_start).
"'";
295if ($search_date_end_end) {
296 $morewherefilterarray[] =
" t.datee <= '".$db->idate($search_date_end_end).
"'";
299if (!empty($search_planedworkload)) {
300 $morewherefilterarray[] =
natural_search(
't.planned_workload', $search_planedworkload, 1, 1);
303if (!empty($search_timespend)) {
304 $morewherefilterarray[] =
natural_search(
't.duration_effective', $search_timespend, 1, 1);
307if (!empty($search_progressdeclare)) {
308 $morewherefilterarray[] =
natural_search(
't.progress', $search_progressdeclare, 1, 1);
310if (!empty($search_progresscalc)) {
311 $morewherefilterarray[] =
'(planned_workload IS NULL OR planned_workload = 0 OR '.natural_search(
'ROUND(100 * duration_effective / planned_workload, 2)', $search_progresscalc, 1, 1).
')';
314if ($search_task_budget_amount) {
315 $morewherefilterarray[] =
natural_search(
't.budget_amount', $search_task_budget_amount, 1, 1);
319$morewherefilter =
'';
320if (count($morewherefilterarray) > 0) {
321 $morewherefilter =
' AND '.implode(
' AND ', $morewherefilterarray);
324if ($action ==
'createtask' && $user->hasRight(
'projet',
'creer')) {
332 if (empty($taskref)) {
333 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")),
null,
'errors');
338 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")),
null,
'errors');
341 } elseif (!
GETPOST(
'task_parent')) {
342 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"ChildOfProjectTask")),
null,
'errors');
348 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
349 $projectid = empty($tmparray[0]) ? $id : (int) $tmparray[0];
350 $task_parent = empty($tmparray[1]) ? 0 : $tmparray[1];
352 $task =
new Task($db);
354 $task->fk_project = $projectid;
355 $task->entity =
$object->entity;
356 $task->ref = $taskref;
357 $task->label = $label;
358 $task->description = $description;
359 $task->planned_workload = $planned_workload;
360 $task->fk_task_parent = $task_parent;
362 $task->date_start = $date_start;
363 $task->date_end = $date_end;
364 $task->progress = $progress;
365 $task->budget_amount = $budget_amount;
368 $ret = $extrafields->setOptionalsFromPost(
null, $task);
370 $taskid = $task->create($user);
373 $result = $task->add_contact(
GETPOSTINT(
"userid"),
'TASKEXECUTIVE',
'internal');
375 if ($db->lasterrno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
376 $langs->load(
"projects");
378 $duplicate_code_error =
true;
388 if (!empty($backtopage)) {
389 header(
"Location: ".$backtopage);
391 } elseif (empty($projectid)) {
392 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks/list.php'.(empty($mode) ?
'' :
'?mode='.$mode));
398 if (!empty($backtopage)) {
399 header(
"Location: ".$backtopage);
401 } elseif (empty($id)) {
403 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks/list.php'.(empty($mode) ?
'' :
'?mode='.$mode));
415$form =
new Form($db);
418$projectstatic =
new Project($db);
419$taskstatic =
new Task($db);
420$userstatic =
new User($db);
422$title = $langs->trans(
"Tasks").
' - '.
$object->ref.
' '.
$object->name;
424 $title =
$object->ref.
' '.
$object->name.
' - '.$langs->trans(
"Tasks");
426if ($action ==
'create') {
427 $title = $langs->trans(
"NewTask");
429$help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
433$arrayofselected = is_array($toselect) ? $toselect : array();
435if ($id > 0 || !empty($ref)) {
436 $result =
$object->fetch($id, $ref);
440 $result =
$object->fetch_thirdparty();
444 $result =
$object->fetch_optionals();
452 $userWrite =
$object->restrictedProjectArea($user,
'write');
457 $tab = (GETPOSTISSET(
'tab') ?
GETPOST(
'tab') :
'tasks');
462 $param =
'&id='.$object->id;
463 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
464 $param .=
'&contextpage='.urlencode($contextpage);
466 if ($search_user_id) {
467 $param .=
'&search_user_id='.urlencode((
string) ($search_user_id));
469 if ($search_taskref) {
470 $param .=
'&search_taskref='.urlencode($search_taskref);
472 if ($search_tasklabel) {
473 $param .=
'&search_tasklabel='.urlencode($search_tasklabel);
475 if ($search_taskdescription) {
476 $param .=
'&search_taskdescription='.urlencode($search_taskdescription);
478 if ($search_dtstartday) {
479 $param .=
'&search_dtstartday='.urlencode($search_dtstartday);
481 if ($search_dtstartmonth) {
482 $param .=
'&search_dtstartmonth='.urlencode($search_dtstartmonth);
484 if ($search_dtstartyear) {
485 $param .=
'&search_dtstartyear='.urlencode($search_dtstartyear);
487 if ($search_dtendday) {
488 $param .=
'&search_dtendday='.urlencode($search_dtendday);
490 if ($search_dtendmonth) {
491 $param .=
'&search_dtendmonth='.urlencode($search_dtendmonth);
493 if ($search_dtendyear) {
494 $param .=
'&search_dtendyear='.urlencode($search_dtendyear);
496 if ($search_date_start_startmonth) {
497 $param .=
'&search_date_start_startmonth='.urlencode((
string) ($search_date_start_startmonth));
499 if ($search_date_start_startyear) {
500 $param .=
'&search_date_start_startyear='.urlencode((
string) ($search_date_start_startyear));
502 if ($search_date_start_startday) {
503 $param .=
'&search_date_start_startday='.urlencode((
string) ($search_date_start_startday));
505 if ($search_date_start_start) {
506 $param .=
'&search_date_start_start='.urlencode($search_date_start_start);
508 if ($search_date_start_endmonth) {
509 $param .=
'&search_date_start_endmonth='.urlencode((
string) ($search_date_start_endmonth));
511 if ($search_date_start_endyear) {
512 $param .=
'&search_date_start_endyear='.urlencode((
string) ($search_date_start_endyear));
514 if ($search_date_start_endday) {
515 $param .=
'&search_date_start_endday='.urlencode((
string) ($search_date_start_endday));
517 if ($search_date_start_end) {
518 $param .=
'&search_date_start_end='.urlencode($search_date_start_end);
520 if ($search_date_end_startmonth) {
521 $param .=
'&search_date_end_startmonth='.urlencode((
string) ($search_date_end_startmonth));
523 if ($search_date_end_startyear) {
524 $param .=
'&search_date_end_startyear='.urlencode((
string) ($search_date_end_startyear));
526 if ($search_date_end_startday) {
527 $param .=
'&search_date_end_startday='.urlencode((
string) ($search_date_end_startday));
529 if ($search_date_end_start) {
530 $param .=
'&search_date_end_start='.urlencode($search_date_end_start);
532 if ($search_date_end_endmonth) {
533 $param .=
'&search_date_end_endmonth='.urlencode((
string) ($search_date_end_endmonth));
535 if ($search_date_end_endyear) {
536 $param .=
'&search_date_end_endyear='.urlencode((
string) ($search_date_end_endyear));
538 if ($search_date_end_endday) {
539 $param .=
'&search_date_end_endday='.urlencode((
string) ($search_date_end_endday));
541 if ($search_date_end_end) {
542 $param .=
'&search_date_end_end=' . urlencode($search_date_end_end);
544 if ($search_planedworkload) {
545 $param .=
'&search_planedworkload='.urlencode($search_planedworkload);
547 if ($search_timespend) {
548 $param .=
'&search_timespend='.urlencode($search_timespend);
550 if ($search_progresscalc) {
551 $param .=
'&search_progresscalc='.urlencode($search_progresscalc);
553 if ($search_progressdeclare) {
554 $param .=
'&search_progressdeclare='.urlencode($search_progressdeclare);
556 if ($search_task_budget_amount) {
557 $param .=
'&search_task_budget_amount='.urlencode($search_task_budget_amount);
559 if ($optioncss !=
'') {
560 $param .=
'&optioncss='.urlencode($optioncss);
563 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
565 $arrayofmassactions = array();
566 if ($user->hasRight(
'projet',
'creer')) {
567 $arrayofmassactions[
'preclonetasks'] =
img_picto(
'',
'clone',
'class="pictofixedwidth"').$langs->trans(
"Clone");
569 if ($permissiontodelete) {
570 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
572 if (in_array($massaction, array(
'presend',
'predelete'))) {
573 $arrayofmassactions = array();
575 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
579 if (!empty($_SESSION[
'pageforbacktolist']) && !empty($_SESSION[
'pageforbacktolist'][
'project'])) {
580 $tmpurl = $_SESSION[
'pageforbacktolist'][
'project'];
581 $tmpurl = preg_replace(
'/__SOCID__/', (
string)
$object->socid, $tmpurl);
582 $linkback =
'<a href="'.$tmpurl.(preg_match(
'/\?/', $tmpurl) ?
'&' :
'?').
'restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
584 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
587 $morehtmlref =
'<div class="refidno">';
589 $morehtmlref .=
$object->title;
591 if (!empty(
$object->thirdparty->id) &&
$object->thirdparty->id > 0) {
592 $morehtmlref .=
'<br>'.$object->thirdparty->getNomUrl(1,
'project');
594 $morehtmlref .=
'</div>';
597 if (!$user->hasRight(
'projet',
'all',
'lire')) {
598 $objectsListId =
$object->getProjectsAuthorizedForUser($user, 0, 0);
599 $object->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
602 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
604 print
'<div class="fichecenter">';
605 print
'<div class="fichehalfleft">';
606 print
'<div class="underbanner clearboth"></div>';
608 print
'<table class="border tableforfield centpercent">';
612 print
'<tr><td class="tdtop">';
613 print $langs->trans(
"Usage");
617 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : (
$object->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
618 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
619 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
623 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : (
$object->usage_task ?
' checked="checked"' :
'')).
'"> ';
624 $htmltext = $langs->trans(
"ProjectFollowTasks");
625 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
629 print
'<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET(
'usage_bill_time') ? (
GETPOST(
'usage_bill_time',
'alpha') !=
'' ?
' checked="checked"' :
'') : (
$object->usage_bill_time ?
' checked="checked"' :
'')).
'"> ';
630 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
631 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
634 if (isModEnabled(
'eventorganization')) {
635 print
'<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET(
'usage_organize_event') ? (
GETPOST(
'usage_organize_event',
'alpha') !=
'' ?
' checked="checked"' :
'') : (
$object->usage_organize_event ?
' checked="checked"' :
'')).
'"> ';
636 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
637 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
643 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
645 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
646 print $langs->trans(
'SharedProject');
648 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
649 print $langs->trans(
'PrivateProject');
654 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
655 if (!is_null(
$object->budget_amount) && strcmp(
$object->budget_amount,
'')) {
656 print
'<span class="amount">'.price(
$object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
661 print
'<tr><td>'.$langs->trans(
"Dates").
'</td><td>';
663 print($start ? $start :
'?');
666 print($end ? $end :
'?');
674 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
679 print
'<div class="fichehalfright">';
680 print
'<div class="underbanner clearboth"></div>';
682 print
'<table class="border tableforfield centpercent">';
685 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
690 if (isModEnabled(
'category')) {
691 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
692 print $form->showCategories(
$object->id, Categorie::TYPE_PROJECT, 1);
701 print
'<div class="clearboth"></div>';
708if ($action ==
'create' && $user->hasRight(
'projet',
'creer') && (empty(
$object->thirdparty->id) || $userWrite > 0)) {
709 if ($id > 0 || !empty($ref)) {
715 $projectoktoentertime = 1;
717 $projectoktoentertime = 0;
718 print
'<div class="warning">';
719 $langs->load(
"errors");
720 print $langs->trans(
"WarningProjectClosed");
725 $projectoktoentertime = 0;
726 print
'<div class="warning">';
727 $langs->load(
"errors");
728 print $langs->trans(
"WarningProjectDraft");
732 print
'<form action="'.$_SERVER[
'PHP_SELF'].
'" method="POST">';
733 print
'<input type="hidden" name="token" value="'.newToken().
'">';
734 print
'<input type="hidden" name="action" value="createtask">';
735 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
737 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
742 print
'<div class="div-table-responsive-no-min">';
743 print
'<table class="border centpercent">';
746 $obj = !
getDolGlobalString(
'PROJECT_TASK_ADDON') ?
'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
748 require_once DOL_DOCUMENT_ROOT.
"/core/modules/project/task/" .
getDolGlobalString(
'PROJECT_TASK_ADDON').
'.php';
749 $modTask =
new $obj();
750 $defaultref = $modTask->getNextValue(
$object->thirdparty,
null);
753 if (is_numeric($defaultref) && $defaultref <= 0) {
758 print
'<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans(
"Ref").
'</span></td><td>';
759 if (empty($duplicate_code_error)) {
760 print(GETPOSTISSET(
"ref") ?
GETPOST(
"ref",
'alpha') : $defaultref);
764 print
'<input type="hidden" name="taskref" value="'.(GETPOSTISSET(
"ref") ?
GETPOST(
"ref",
'alpha') : $defaultref).
'">';
768 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td><td>';
769 print
'<input type="text" name="label" autofocus class="minwidth500" value="'.$label.
'">';
773 print
'<tr><td class="fieldrequired">'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
774 print
img_picto(
'',
'project',
'class="pictofixedwidth"');
775 if ($projectoktoentertime) {
776 $formother->selectProjectTasks(
GETPOST(
'task_parent'), empty($projectid) ?
$object->id : $projectid,
'task_parent', 0, 0, 1, 1, 0,
'0,1',
'maxwidth500 widthcentpercentminusxx');
778 $formother->selectProjectTasks(
GETPOST(
'task_parent'), empty($projectid) ?
$object->id : $projectid,
'task_parent', 0, 0, 1, 1, 0,
'',
'maxwidth500 widthcentpercentminusxx');
782 $contactsofproject = (empty(
$object->id) ?
'' :
$object->getListContactId(
'internal'));
785 print
'<tr><td>'.$langs->trans(
"AffectedTo").
'</td><td>';
786 print
img_picto(
'',
'user',
'class="pictofixedwidth"');
787 if (is_array($contactsofproject) && count($contactsofproject)) {
788 print $form->select_dolusers($user->id,
'userid', 0,
'', 0,
'', $contactsofproject, 0, 0, 0,
'', 0,
'',
'maxwidth500 widthcentpercentminusx');
790 if ((isset($projectid) && $projectid > 0) ||
$object->id > 0) {
791 print
'<span class="opacitymedium">'.$langs->trans(
"NoUserAssignedToTheProject").
'</span>';
793 print $form->select_dolusers($user->id,
'userid', 0,
'', 0,
'',
'', 0, 0, 0,
'', 0,
'',
'maxwidth500 widthcentpercentminusx');
799 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
800 print
img_picto(
'',
'action',
'class="pictofixedwidth"');
801 print $form->selectDate((!empty($date_start) ? $date_start :
''),
'date_start', 1, 1, 0,
'', 1, 1);
805 print
'<tr><td>'.$langs->trans(
"DateEnd").
'</td><td>';
806 print
img_picto(
'',
'action',
'class="pictofixedwidth"');
807 print $form->selectDate((!empty($date_end) ? $date_end : -1),
'date_end', -1, 1, 0,
'', 1, 1);
811 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
812 print
img_picto(
'',
'clock',
'class="pictofixedwidth"');
813 print $form->select_duration(
'planned_workload', $planned_workload, 0,
'text');
817 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
818 print
img_picto(
'',
'fa-percent',
'class="pictofixedwidth"');
819 print $formother->select_percent($progress,
'progress', 0, 5, 0, 100, 1);
823 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
827 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
832 $doleditor =
new DolEditor(
'description',
$object->description,
'', 80,
'dolibarr_details',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_SOCIETE'), $nbrows,
'90%');
833 print $doleditor->Create();
837 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
838 print
img_picto(
'',
'currency',
'class="pictofixedwidth"');
839 print
'<input size="8" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
'').
'"></td>';
843 $parameters = array(
'arrayfields' => &$arrayfields);
844 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $taskstatic, $action);
845 print $hookmanager->resPrint;
847 if (empty($reshook) && !empty($extrafields->attributes[$taskstatic->table_element][
'label'])) {
848 print $taskstatic->showOptionals($extrafields,
'edit');
856 print $form->buttonsSaveCancel(
"Add");
859} elseif ($id > 0 || !empty($ref)) {
860 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
869 $linktocreatetaskParam = array();
870 $linktocreatetaskUserRight =
false;
871 if ($user->hasRight(
'projet',
'all',
'creer') || $user->hasRight(
'projet',
'creer')) {
872 if (
$object->public || $userWrite > 0) {
873 $linktocreatetaskUserRight =
true;
875 $linktocreatetaskParam[
'attr'][
'title'] = $langs->trans(
"NotOwnerOfProject");
879 $linktocreatetask =
dolGetButtonTitle($langs->trans(
'AddTask'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/projet/tasks.php?action=create'.$param.
'&backtopage='.urlencode($_SERVER[
'PHP_SELF'].
'?id='.
$object->id),
'', $linktocreatetaskUserRight, $linktocreatetaskParam);
881 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'">';
882 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
883 print
'<input type="hidden" name="token" value="'.newToken().
'">';
884 print
'<input type="hidden" name="action" value="list">';
885 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
886 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
887 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
888 print
'<input type="hidden" name="page" value="'.$page.
'">';
889 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
891 $title = $langs->trans(
"ListOfTasks");
892 $linktotasks =
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/projet/tasks.php?id='.
$object->id,
'', 1, array(
'morecss' =>
'reposition btnTitleSelected'));
893 $linktotasks .=
dolGetButtonTitle($langs->trans(
'ViewGantt'),
'',
'fa fa-stream imgforviewmode', DOL_URL_ROOT.
'/projet/ganttview.php?id='.
$object->id.
'&withproject=1',
'', 1, array(
'morecss' =>
'reposition marginleftonly'));
896 print
load_fiche_titre($title, $linktotasks.
' '.$linktocreatetask,
'projecttask',
'',
'',
'', $massactionbutton);
898 $objecttmp =
new Task($db);
899 $trackid =
'task'.$taskstatic->id;
900 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
904 $filteronthirdpartyid = $socid;
905 $tasksarray = $taskstatic->getTasksArray(0, 0,
$object->id, $filteronthirdpartyid, 0,
'', -1, $morewherefilter, 0, 0, $extrafields, 1, $search_array_options, 1, 1, $sortfield, $sortorder);
908 $tmpuser =
new User($db);
909 if ($search_user_id > 0) {
910 $tmpuser->fetch($search_user_id);
913 $tasksrole = ($tmpuser->id > 0 ? $taskstatic->getUserRolesForProjectsOrTasks(
null, $tmpuser,
$object->id, 0) :
'');
917 if (!empty($conf->use_javascript_ajax)) {
918 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
923 $moreforfilter .=
'<div class="divsearchfield">';
924 $moreforfilter .=
img_picto(
'',
'user',
'class="pictofixedwidth"');
925 $moreforfilter .= $form->select_dolusers($tmpuser->id > 0 ? $tmpuser->id :
'',
'search_user_id', $langs->trans(
"TasksAssignedTo"), null, 0,
'',
'');
926 $moreforfilter .=
'</div>';
927 if ($moreforfilter) {
928 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
929 print $moreforfilter;
934 if ($massactionbutton && $contextpage !=
'poslist') {
935 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
938 print
'<div class="div-table-responsive">';
939 print
'<table id="tablelines" class="tagtable nobottom liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">';
942 print
'<tr class="liste_titre_filter">';
946 print
'<td class="liste_titre maxwidthsearch">';
947 $searchpicto = $form->showFilterButtons();
952 if (!empty($arrayfields[
't.ref'][
'checked'])) {
953 print
'<td class="liste_titre">';
954 print
'<input class="flat searchstring maxwidth50" type="text" name="search_taskref" value="'.dol_escape_htmltag($search_taskref).
'">';
958 if (!empty($arrayfields[
't.label'][
'checked'])) {
959 print
'<td class="liste_titre">';
960 print
'<input class="flat searchstring maxwidth100" type="text" name="search_tasklabel" value="'.dol_escape_htmltag($search_tasklabel).
'">';
964 if (!empty($arrayfields[
't.description'][
'checked'])) {
965 print
'<td class="liste_titre">';
966 print
'<input class="flat searchstring maxwidth100" type="text" name="search_taskdescription" value="'.dol_escape_htmltag($search_taskdescription).
'">';
970 if (!empty($arrayfields[
't.dateo'][
'checked'])) {
971 print
'<td class="liste_titre center">';
975 print
'<div class="nowrapfordate">';
976 print $form->selectDate($search_date_start_start ? $search_date_start_start : -1,
'search_date_start_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
978 print
'<div class="nowrapfordate">';
979 print $form->selectDate($search_date_start_end ? $search_date_start_end : -1,
'search_date_start_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
984 if (!empty($arrayfields[
't.datee'][
'checked'])) {
985 print
'<td class="liste_titre center">';
989 print
'<div class="nowrapfordate">';
990 print $form->selectDate($search_date_end_start ? $search_date_end_start : -1,
'search_date_end_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
992 print
'<div class="nowrapfordate">';
993 print $form->selectDate($search_date_end_end ? $search_date_end_end : -1,
'search_date_end_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
998 if (!empty($arrayfields[
't.planned_workload'][
'checked'])) {
999 print
'<td class="liste_titre right">';
1000 print
'<input class="flat" type="text" size="4" name="search_planedworkload" value="'.$search_planedworkload.
'">';
1004 if (!empty($arrayfields[
't.duration_effective'][
'checked'])) {
1005 print
'<td class="liste_titre right">';
1006 print
'<input class="flat" type="text" size="4" name="search_timespend" value="'.$search_timespend.
'">';
1010 if (!empty($arrayfields[
't.progress_calculated'][
'checked'])) {
1011 print
'<td class="liste_titre right">';
1012 print
'<input class="flat" type="text" size="4" name="search_progresscalc" value="'.$search_progresscalc.
'">';
1016 if (!empty($arrayfields[
't.progress'][
'checked'])) {
1017 print
'<td class="liste_titre right">';
1018 print
'<input class="flat" type="text" size="4" name="search_progressdeclare" value="'.$search_progressdeclare.
'">';
1023 if (!empty($arrayfields[
't.progress_summary'][
'checked'])) {
1024 print
'<td class="liste_titre right"></td>';
1027 if (
$object->usage_bill_time) {
1028 if (!empty($arrayfields[
't.tobill'][
'checked'])) {
1029 print
'<td class="liste_titre right">';
1033 if (!empty($arrayfields[
't.billed'][
'checked'])) {
1034 print
'<td class="liste_titre right">';
1045 if (!empty($arrayfields[
't.budget_amount'][
'checked'])) {
1046 print
'<td class="liste_titre center">';
1047 print
'<input type="text" class="flat" name="search_task_budget_amount" value="'.$search_task_budget_amount.
'" size="4">';
1051 if (!empty($arrayfields[
'c.assigned'][
'checked'])) {
1052 print
'<td class="liste_titre right">';
1056 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
1058 print
'<td class="liste_titre maxwidthsearch"> </td>';
1062 print
'<td class="liste_titre maxwidthsearch">';
1063 $searchpicto = $form->showFilterButtons();
1070 print
'<tr class="liste_titre nodrag nodrop">';
1073 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
1076 if (!empty($arrayfields[
't.ref'][
'checked'])) {
1077 print_liste_field_titre($arrayfields[
't.ref'][
'label'], $_SERVER[
"PHP_SELF"],
't.ref',
'', $param,
'', $sortfield, $sortorder,
'');
1079 if (!empty($arrayfields[
't.label'][
'checked'])) {
1080 print_liste_field_titre($arrayfields[
't.label'][
'label'], $_SERVER[
"PHP_SELF"],
"t.label",
'', $param,
'', $sortfield, $sortorder,
'');
1082 if (!empty($arrayfields[
't.description'][
'checked'])) {
1083 print_liste_field_titre($arrayfields[
't.description'][
'label'], $_SERVER[
"PHP_SELF"],
"",
'', $param,
'', $sortfield, $sortorder,
'');
1085 if (!empty($arrayfields[
't.dateo'][
'checked'])) {
1086 print_liste_field_titre($arrayfields[
't.dateo'][
'label'], $_SERVER[
"PHP_SELF"],
"t.dateo",
'', $param,
'', $sortfield, $sortorder,
'center ');
1088 if (!empty($arrayfields[
't.datee'][
'checked'])) {
1089 print_liste_field_titre($arrayfields[
't.datee'][
'label'], $_SERVER[
"PHP_SELF"],
"t.datee",
'', $param,
'', $sortfield, $sortorder,
'center ');
1091 if (!empty($arrayfields[
't.planned_workload'][
'checked'])) {
1092 print_liste_field_titre($arrayfields[
't.planned_workload'][
'label'], $_SERVER[
"PHP_SELF"],
"t.planned_workload",
'', $param,
'', $sortfield, $sortorder,
'right ',
'', 1);
1094 if (!empty($arrayfields[
't.duration_effective'][
'checked'])) {
1095 print_liste_field_titre($arrayfields[
't.duration_effective'][
'label'], $_SERVER[
"PHP_SELF"],
"t.duration_effective",
'', $param,
'', $sortfield, $sortorder,
'right ',
'', 1);
1097 if (!empty($arrayfields[
't.progress_calculated'][
'checked'])) {
1098 print_liste_field_titre($arrayfields[
't.progress_calculated'][
'label'], $_SERVER[
"PHP_SELF"],
"",
'', $param,
'', $sortfield, $sortorder,
'right ',
'', 1);
1100 if (!empty($arrayfields[
't.progress'][
'checked'])) {
1101 print_liste_field_titre($arrayfields[
't.progress'][
'label'], $_SERVER[
"PHP_SELF"],
"t.progress",
'', $param,
'', $sortfield, $sortorder,
'right ',
'', 1);
1103 if (!empty($arrayfields[
't.progress_summary'][
'checked'])) {
1104 print_liste_field_titre($arrayfields[
't.progress_summary'][
'label'], $_SERVER[
"PHP_SELF"],
"",
'', $param,
'', $sortfield, $sortorder,
'center ',
'', 1);
1106 if (
$object->usage_bill_time) {
1107 if (!empty($arrayfields[
't.tobill'][
'checked'])) {
1108 print_liste_field_titre($arrayfields[
't.tobill'][
'label'], $_SERVER[
"PHP_SELF"],
"t.tobill",
'', $param,
'', $sortfield, $sortorder,
'right ');
1110 if (!empty($arrayfields[
't.billed'][
'checked'])) {
1111 print_liste_field_titre($arrayfields[
't.billed'][
'label'], $_SERVER[
"PHP_SELF"],
"t.billed",
'', $param,
'', $sortfield, $sortorder,
'right ');
1121 if (!empty($arrayfields[
't.budget_amount'][
'checked'])) {
1122 print_liste_field_titre($arrayfields[
't.budget_amount'][
'label'], $_SERVER[
"PHP_SELF"],
"t.budget_amount",
"", $param,
'', $sortfield, $sortorder,
'center ');
1125 if (!empty($arrayfields[
'c.assigned'][
'checked'])) {
1126 print_liste_field_titre($arrayfields[
'c.assigned'][
'label'], $_SERVER[
"PHP_SELF"],
"",
'', $param,
'', $sortfield, $sortorder,
'center ',
'');
1129 $disablesortlink = 1;
1130 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1132 $parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
1133 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
1134 print $hookmanager->resPrint;
1138 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
1143 if (count($tasksarray) > 0) {
1147 $nboftaskshown =
projectLinesa($j, 0, $tasksarray, $level,
true, 0, $tasksrole,
$object->id, 1,
$object->id,
'', (
$object->usage_bill_time ? 1 : 0), $arrayfields, $arrayofselected);
1149 $colspan = count($arrayfields);
1150 if (
$object->usage_bill_time) {
1153 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoTasks").
'</span></td></tr>';
1164 if ($user->hasRight(
'projet',
'all',
'lire')) {
1165 if ($search_user_id == $user->id) {
1166 if ($nboftaskshown < count($tasksrole)) {
1167 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
1171 if ($nboftaskshown < count($tasksarray) && !
GETPOSTINT(
'search_user_id')) {
1172 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
Class to manage projects.
const STATUS_CLOSED
Closed status.
const STATUS_DRAFT
Draft status.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $excludefirstand=0, $gm=false)
Generate a SQL string to make a filter into a range (for second of date until last second of date).
cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
Clean corrupted tree (orphelins linked to a not existing parent), record linked to themself and child...
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
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.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_now($mode='auto')
Return date for now.
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_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
GETPOSTFLOAT($paramname, $rounding='')
Return the value of a $_GET or $_POST supervariable, converted into float.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0, $projectidfortotallink=0, $dummy='', $showbilltime=0, $arrayfields=array(), $arrayofselected=array())
Show task lines with a particular parent.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.