27 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
30 if (!empty($conf->project->enabled)) {
31 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 $langs->loadLangs(array(
'companies',
'interventions'));
39 $action =
GETPOST(
'action',
'aZ09');
43 $socid = $user->socid;
45 $hookmanager->initHooks(array(
'fichinternote'));
49 $object->fetch($id, $ref);
51 $permissionnote = $user->rights->ficheinter->creer;
57 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
61 if (empty($reshook)) {
62 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
70 llxHeader(
'', $langs->trans(
"Intervention"));
74 if ($id > 0 || !empty($ref)) {
75 $object->fetch_thirdparty();
78 print
dol_get_fiche_head($head,
'note', $langs->trans(
'InterventionCard'), -1,
'intervention');
81 $linkback =
'<a href="'.DOL_URL_ROOT.
'/fichinter/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
84 $morehtmlref =
'<div class="refidno">';
89 $morehtmlref .= $langs->trans(
'ThirdParty').
' : '.$object->thirdparty->getNomUrl(1);
91 if (!empty($conf->project->enabled)) {
92 $langs->load(
"projects");
93 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' ';
94 if ($user->rights->commande->creer) {
95 if ($action !=
'classify') {
97 $morehtmlref .=
' : ';
99 if ($action ==
'classify') {
101 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'">';
102 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
103 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
104 $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
105 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
106 $morehtmlref .=
'</form>';
108 $morehtmlref .=
$form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->socid, $object->fk_project,
'none', 0, 0, 0, 1);
111 if (!empty($object->fk_project)) {
113 $proj->fetch($object->fk_project);
114 $morehtmlref .=
' : '.$proj->getNomUrl(1);
116 $morehtmlref .=
' - '.$proj->title;
123 $morehtmlref .=
'</div>';
125 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
127 print
'<div class="fichecenter">';
128 print
'<div class="underbanner clearboth"></div>';
130 $cssclass =
"titlefield";
131 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';