29require
"../../main.inc.php";
30require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
41$langs->loadlangs(array(
'projects',
'companies'));
43$action =
GETPOST(
'action',
'aZ09');
44$confirm =
GETPOST(
'confirm',
'alpha');
52$ref =
GETPOST(
"ref",
'alpha', 1);
53$taskref =
GETPOST(
"taskref",
'alpha');
55$project_ref =
GETPOST(
'project_ref',
'alpha');
56$planned_workload = ((
GETPOST(
'planned_workloadhour') !=
'' ||
GETPOST(
'planned_workloadmin') !=
'') ? (
GETPOSTINT(
'planned_workloadhour') > 0 ?
GETPOSTINT(
'planned_workloadhour') * 3600 : 0) + (
GETPOSTINT(
'planned_workloadmin') > 0 ?
GETPOSTINT(
'planned_workloadmin') * 60 : 0) :
'');
57$mode =
GETPOST(
'mode',
'alpha');
60$hookmanager->initHooks(array(
'projecttaskcard',
'globalcard'));
64$projectstatic =
new Project($db);
67$extrafields->fetch_name_optionals_label(
$object->table_element);
69$parameters = array(
'id' => $id);
70$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
90if ($action ==
'update' && !
GETPOST(
"cancel") && $user->hasRight(
'projet',
'creer')) {
93 if (empty($taskref)) {
95 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")),
null,
'errors');
99 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")),
null,
'errors');
104 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
105 $task_parent = $tmparray[1];
106 if (empty($task_parent)) {
117 $object->fk_task_parent = $task_parent;
118 $object->planned_workload = $planned_workload;
126 $ret = $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
132 $result =
$object->update($user);
145if ($action ==
'confirm_merge' && $confirm ==
'yes' && $user->hasRight(
'projet',
'creer')) {
147 $task_origin =
new Task($db);
149 if ($task_origin_id <= 0) {
150 $langs->load(
'errors');
151 setEventMessages($langs->trans(
'ErrorTaskIdIsMandatory', $langs->transnoentitiesnoconv(
'MergeOriginTask')),
null,
'errors');
153 if (!$error && $task_origin->fetch($task_origin_id) < 1) {
158 $result =
$object->mergeTask($task_origin_id);
169if ($action ==
'confirm_clone' && $confirm ==
'yes') {
171 $clone_prog =
GETPOST(
'clone_prog') ? 1 : 0;
172 $clone_time =
GETPOST(
'clone_time') ? 1 : 0;
173 $clone_affectation =
GETPOST(
'clone_affectation') ? 1 : 0;
174 $clone_change_dt =
GETPOST(
'clone_change_dt') ? 1 : 0;
175 $clone_notes =
GETPOST(
'clone_notes') ? 1 : 0;
176 $clone_file =
GETPOST(
'clone_file') ? 1 : 0;
177 $result =
$object->createFromClone($user,
$object->id,
$object->fk_project,
$object->fk_task_parent, $clone_change_dt, $clone_affectation, $clone_time, $clone_file, $clone_notes, $clone_prog);
182 $newobject =
new Task($db);
183 $newobject->fetch($result);
184 $newobject->fetch_optionals();
185 $newobject->fetch_thirdparty();
191if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->hasRight(
'projet',
'supprimer')) {
192 $result = $projectstatic->fetch(
$object->fk_project);
193 $projectstatic->fetch_thirdparty();
195 if (
$object->delete($user) > 0) {
196 header(
'Location: '.DOL_URL_ROOT.
'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ?
'&withproject=1' :
''));
205if (!empty($project_ref) && !empty($withproject)) {
206 if ($projectstatic->fetch(0, $project_ref) > 0) {
207 $tasksarray =
$object->getTasksArray(
null,
null, $projectstatic->id, $socid, 0);
208 if (count($tasksarray) > 0) {
209 $id = $tasksarray[0]->id;
211 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ?
'' :
'&mode='.$mode));
217if ($action ==
'builddoc' && $user->hasRight(
'projet',
'creer')) {
223 $outputlangs = $langs;
224 if (
GETPOST(
'lang_id',
'aZ09')) {
226 $outputlangs->setDefaultLang(
GETPOST(
'lang_id',
'aZ09'));
228 $result =
$object->generateDocument(
$object->model_pdf, $outputlangs);
236if ($action ==
'remove_file' && $user->hasRight(
'projet',
'creer')) {
237 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
239 $langs->load(
"other");
240 $upload_dir = $conf->project->dir_output;
255$form =
new Form($db);
259$result = $projectstatic->fetch(
$object->fk_project);
262if (!empty($withproject)) {
263 $title .=
' | ' . $langs->trans(
"Project") . (!empty($projectstatic->ref) ?
': '.$projectstatic->ref :
'') ;
267llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-project project-tasks page-task');
270if ($id > 0 || !empty($ref)) {
271 $res =
$object->fetch_optionals();
272 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_TASK') && method_exists($object,
'fetchComments') && empty(
$object->comments)) {
277 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
278 $projectstatic->fetchComments();
280 if (!empty($projectstatic->socid)) {
281 $projectstatic->fetch_thirdparty();
284 $object->project = clone $projectstatic;
288 if (!empty($withproject)) {
292 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
294 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
298 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
300 $morehtmlref =
'<div class="refidno">';
302 $morehtmlref .= $projectstatic->title;
304 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
305 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
307 $morehtmlref .=
'</div>';
310 if (!$user->hasRight(
'projet',
'all',
'lire')) {
311 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
312 $projectstatic->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
315 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
317 print
'<div class="fichecenter">';
318 print
'<div class="fichehalfleft">';
319 print
'<div class="underbanner clearboth"></div>';
321 print
'<table class="border tableforfield centpercent">';
325 print
'<tr><td class="tdtop">';
326 print $langs->trans(
"Usage");
330 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
331 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
332 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
336 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
337 $htmltext = $langs->trans(
"ProjectFollowTasks");
338 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
342 print
'<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET(
'usage_bill_time') ? (
GETPOST(
'usage_bill_time',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_bill_time ?
' checked="checked"' :
'')).
'"> ';
343 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
344 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
347 if (isModEnabled(
'eventorganization')) {
348 print
'<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET(
'usage_organize_event') ? (
GETPOST(
'usage_organize_event',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_organize_event ?
' checked="checked"' :
'')).
'"> ';
349 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
350 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
356 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
357 if ($projectstatic->public) {
358 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
359 print $langs->trans(
'SharedProject');
361 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
362 print $langs->trans(
'PrivateProject');
367 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
368 if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount,
'')) {
369 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
374 print
'<tr><td>'.$langs->trans(
"Dates").
'</td><td>';
376 print($start ? $start :
'?');
379 print($end ? $end :
'?');
380 if ($projectstatic->hasDelay()) {
393 print
'<div class="fichehalfright">';
394 print
'<div class="underbanner clearboth"></div>';
396 print
'<table class="border tableforfield centpercent">';
399 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
400 print nl2br($projectstatic->description);
404 if (isModEnabled(
'category')) {
405 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
406 print $form->showCategories($projectstatic->id,
'project', 1);
415 print
'<div class="clearboth"></div>';
453 if ($action ==
'edit' && $user->hasRight(
'projet',
'creer')) {
454 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
455 print
'<input type="hidden" name="token" value="'.newToken().
'">';
456 print
'<input type="hidden" name="action" value="update">';
457 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
458 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
460 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), 0,
'projecttask', 0,
'',
'');
462 print
'<table class="border centpercent">';
465 print
'<tr><td class="titlefield fieldrequired">'.$langs->trans(
"Ref").
'</td>';
466 print
'<td><input class="minwidth100" name="taskref" value="'.$object->ref.
'"></td></tr>';
469 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td>';
470 print
'<td><input class="minwidth500" name="label" value="'.$object->label.
'"></td></tr>';
473 if (empty($withproject)) {
474 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
475 print $projectstatic->getNomUrl(1);
479 print
'<td>'.$langs->trans(
"ThirdParty").
'</td><td>';
480 if ($projectstatic->thirdparty->id) {
481 print $projectstatic->thirdparty->getNomUrl(1);
489 print
'<tr><td>'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
491 $formother->selectProjectTasks(
$object->fk_task_parent, $projectstatic->id,
'task_parent', ($user->admin ? 0 : 1), 0, 0, 0,
$object->id,
'',
'minwidth100 widthcentpercentminusxx maxwidth500');
495 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
496 print $form->selectDate(
$object->date_start,
'date_start', 1, 1, 0,
'', 1, 0);
500 print
'<tr><td>'.$langs->trans(
"Deadline").
'</td><td>';
501 print $form->selectDate(
$object->date_end ?
$object->date_end : -1,
'date_end', 1, 1, 0,
'', 1, 0);
505 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
506 print $form->select_duration(
'planned_workload',
$object->planned_workload, 0,
'text');
510 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td>';
511 print $formother->select_percent(
$object->progress,
'progress', 0, 5, 0, 100, 1);
515 print
'<tr><td>'.$langs->trans(
"Billable").
'</td><td>';
516 print $form->selectyesno(
'billable',
$object->billable);
521 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
525 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
527 $doleditor =
new DolEditor(
'description',
$object->description,
'', 80,
'dolibarr_details',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_SOCIETE'), $nbrows,
'90%');
528 print $doleditor->Create();
533 print
'<tr><td>'.$langs->trans(
"Budget").
'</td>';
534 print
'<td><input class="width75" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
price2num(
$object->budget_amount)).
'"></td>';
538 $parameters = array();
539 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
540 print $hookmanager->resPrint;
541 if (empty($reshook)) {
542 print
$object->showOptionals($extrafields,
'edit');
549 print $form->buttonsSaveCancel(
"Modify");
556 $param = ($withproject ?
'&withproject=1' :
'');
557 $linkback = $withproject ?
'<a href="'.DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.
'&restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>' :
'';
559 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), -1,
'projecttask', 0,
'',
'reposition');
561 if ($action ==
'clone') {
562 $formquestion = array(
563 'text' => $langs->trans(
"ConfirmClone"),
565 0 => array(
'type' =>
'checkbox',
'name' =>
'clone_change_dt',
'label' => $langs->trans(
"CloneChanges"),
'value' =>
true),
566 1 => array(
'type' =>
'checkbox',
'name' =>
'clone_affectation',
'label' => $langs->trans(
"CloneAffectation"),
'value' =>
true),
567 2 => array(
'type' =>
'checkbox',
'name' =>
'clone_prog',
'label' => $langs->trans(
"CloneProgression"),
'value' =>
true),
568 3 => array(
'type' =>
'checkbox',
'name' =>
'clone_time',
'label' => $langs->trans(
"CloneTimes"),
'value' =>
true),
569 4 => array(
'type' =>
'checkbox',
'name' =>
'clone_file',
'label' => $langs->trans(
"CloneFile"),
'value' =>
true),
572 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id, $langs->trans(
"ToClone"), $langs->trans(
"ConfirmCloneTask"),
"confirm_clone", $formquestion,
'', 1, 300, 590);
575 if ($action ==
'merge') {
576 $formquestion = array(
578 'name' =>
'task_origin',
579 'label' => $langs->trans(
'MergeOriginTask'),
581 'value' => $formproject->selectTasks(-1,
'',
'task_origin', 24, 0, $langs->trans(
'SelectTask'), 0, 0, 0,
'maxwidth500 minwidth200',
'',
'',
null, 1)
584 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id.(GETPOST(
'withproject') ?
"&withproject=1" :
""), $langs->trans(
"MergeTasks"), $langs->trans(
"ConfirmMergeTasks"),
"confirm_merge", $formquestion,
'yes', 1, 250);
587 if ($action ==
'delete') {
588 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
GETPOSTINT(
"id").
'&withproject='.$withproject, $langs->trans(
"DeleteATask"), $langs->trans(
"ConfirmDeleteATask"),
"confirm_delete");
591 if (!
GETPOST(
'withproject') || empty($projectstatic->id)) {
592 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
593 $object->next_prev_filter =
"fk_projet IN (".$db->sanitize($projectsListId).
")";
595 $object->next_prev_filter =
"fk_projet = ".((int) $projectstatic->id);
601 if (empty($withproject)) {
602 $morehtmlref .=
'<div class="refidno">';
603 $morehtmlref .= $langs->trans(
"Project").
': ';
604 $morehtmlref .= $projectstatic->getNomUrl(1);
605 $morehtmlref .=
'<br>';
608 $morehtmlref .= $langs->trans(
"ThirdParty").
': ';
609 if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
610 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
612 $morehtmlref .=
'</div>';
615 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
617 print
'<div class="fichecenter">';
618 print
'<div class="fichehalfleft">';
620 print
'<div class="underbanner clearboth"></div>';
621 print
'<table class="border centpercent tableforfield">';
624 print
'<tr><td>'.$langs->trans(
"ChildOfTask").
'</td><td>';
625 if (
$object->fk_task_parent > 0) {
626 $tasktmp =
new Task($db);
627 $tasktmp->fetch(
$object->fk_task_parent);
628 print $tasktmp->getNomUrl(1);
633 print
'<tr><td class="titlefield">'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"Deadline").
'</td><td colspan="3">';
635 print($start ? $start :
'?');
638 print($end ? $end :
'?');
645 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td colspan="3">';
646 if (
$object->planned_workload !=
'') {
652 print
'<td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">';
659 print
'<div class="fichehalfright">';
661 print
'<div class="underbanner clearboth"></div>';
662 print
'<table class="border centpercent tableforfield">';
665 print
'<tr><td class="titlefield">'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
672 print
'<tr><td>'.$langs->trans(
"ProgressCalculated").
'</td><td colspan="3">';
673 if (
$object->planned_workload !=
'') {
674 $tmparray =
$object->getSummaryOfTimeSpent();
675 if ($tmparray[
'total_duration'] > 0 && !empty(
$object->planned_workload)) {
676 print round($tmparray[
'total_duration'] /
$object->planned_workload * 100, 2).
' %';
681 print
'<span class="opacitymedium">'.$langs->trans(
"WorkloadNotDefined").
'</span>';
686 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
687 if (!is_null(
$object->budget_amount) && strcmp((
string)
$object->budget_amount,
'')) {
688 print
'<span class="amount">'.price(
$object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
693 print
'<tr><td>'.$langs->trans(
"Billable").
'</td><td>';
694 print
'<span>'.($object->billable ? $langs->trans(
'Yes') : $langs->trans(
'No')).
'</span>';
699 $parameters = array(
'socid' => $socid);
700 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
707 print
'<div class="clearboth"></div>';
713 if ($action !=
'edit') {
718 print
'<div class="tabsAction">';
720 $parameters = array();
721 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
723 if (empty($reshook)) {
725 if ($user->hasRight(
'projet',
'creer')) {
726 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=edit&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Modify').
'</a>';
727 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Clone').
'</a>';
728 print
'<a class="butActionDelete classfortooltip" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=merge&token='.
newToken().
'&withproject='.((int) $withproject).
'" title="'.$langs->trans(
"MergeTasks").
'">'.$langs->trans(
'Merge').
'</a>';
730 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Modify').
'</a>';
734 $permissiontodelete = $user->hasRight(
'projet',
'supprimer');
735 if ($permissiontodelete) {
737 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
739 print
dolGetButtonAction($langs->trans(
"TaskHasChild"), $langs->trans(
"Delete"),
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', 0);
742 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
748 print
'<div class="fichecenter"><div class="fichehalfleft">';
749 print
'<a name="builddoc"></a>';
756 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
757 $genallowed = ($user->hasRight(
'projet',
'lire'));
758 $delallowed = ($user->hasRight(
'projet',
'creer'));
760 print $formfile->showdocuments(
'project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf);
763 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'project_task'), 1);
764 $linktoelem = $tmparray[
'linktoelem'];
765 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
766 print $htmltoenteralink;
768 $compatibleImportElementsList =
false;
769 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
771 print
'</div><div class="fichehalfright">';
774 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
776 $formactions->showactions($object,
'project_task', 0, 1,
'', 10,
'withproject='.$withproject);
778 print
'</div></div>';
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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage a WYSIWYG editor.
Class to manage projects.
Class to manage translations.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
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 a Dolibarr global constant string value.
task_prepare_head($object)
Prepare array with list of tabs.
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.