30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
46$langs->loadLangs(array(
'companies',
'interventions'));
50$action =
GETPOST(
'action',
'aZ09');
54 $socid = $user->socid;
56$hookmanager->initHooks(array(
'fichinternote'));
62$permissionnote = $user->hasRight(
'ficheinter',
'creer');
68$reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
73 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
81llxHeader(
'', $langs->trans(
"Intervention"),
'',
'', 0, 0,
'',
'',
'',
'mod-fichinter page-card_note');
85if ($id > 0 || !empty($ref)) {
92 $linkback =
'<a href="'.DOL_URL_ROOT.
'/fichinter/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
95 $morehtmlref =
'<div class="refidno">';
97 $morehtmlref .= $form->editfieldkey(
"RefCustomer",
'ref_client',
$object->ref_client, $object, 0,
'string',
'', 0, 1);
98 $morehtmlref .= $form->editfieldval(
"RefCustomer",
'ref_client',
$object->ref_client, $object, 0,
'string',
'',
null,
null,
'', 1);
100 $morehtmlref .=
'<br>'.$object->thirdparty->getNomUrl(1,
'customer');
103 $langs->load(
"projects");
104 $morehtmlref .=
'<br>';
105 if ($permissionnote && 0) {
106 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
107 if ($action !=
'classify') {
108 $morehtmlref .=
'<a class="editfielda" href="'.dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
110 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid, (
string)
$object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
112 if (!empty(
$object->fk_project)) {
114 $proj->fetch(
$object->fk_project);
115 $morehtmlref .= $proj->getNomUrl(1);
117 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
122 $morehtmlref .=
'</div>';
124 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
126 print
'<div class="fichecenter">';
127 print
'<div class="underbanner clearboth"></div>';
129 $cssclass =
"titlefield";
130 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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 projects.
fichinter_prepare_head($object)
Prepare array with list of tabs.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
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.