27 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/expensereport.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
33 $langs->loadLangs(array(
'trips',
'companies',
'bills',
'orders'));
37 $socid =
GETPOST(
'socid',
'int');
38 $action =
GETPOST(
'action',
'aZ09');
40 $childids = $user->getAllChildIds(1);
44 if ($user->socid) $socid = $user->socid;
45 $result =
restrictedArea($user,
'expensereport', $id,
'expensereport');
49 if (!$object->fetch($id, $ref) > 0)
54 $permissionnote = $user->rights->expensereport->creer;
60 if (!empty($user->rights->expensereport->readall)) $canread = 1;
61 if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) $canread = 1;
73 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
79 $title = $langs->trans(
"ExpenseReport").
" - ".$langs->trans(
"Note");
80 $helpurl =
"EN:Module_Expense_Reports";
83 $form =
new Form($db);
85 if ($id > 0 || !empty($ref))
88 $object->fetch($id, $ref);
89 $object->info($object->id);
95 $linkback =
'<a href="'.DOL_URL_ROOT.
'/expensereport/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
97 $morehtmlref =
'<div class="refidno">';
98 $morehtmlref .=
'</div>';
101 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
103 print '<div class="fichecenter">';
104 print '<div class="underbanner clearboth"></div>';
106 $cssclass =
"titlefield";
107 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
expensereport_prepare_head($object)
Prepare array with list of tabs.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage Trips and Expenses.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.