32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/loan/class/loan.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/loan.lib.php';
35if (isModEnabled(
'project')) {
36 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39$action =
GETPOST(
'action',
'aZ09');
42$langs->loadLangs(array(
"loan"));
47$hookmanager->initHooks(array(
'loannote'));
55$permissionnote = $user->hasRight(
'loan',
'write');
63$reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
68 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
78$title = $langs->trans(
"Loan").
' - '.$langs->trans(
"Notes");
79$help_url =
'EN:Module_Loan|FR:Module_Emprunt';
86 $totalpaid =
$object->getSumPayment();
92 $morehtmlref =
'<div class="refidno">';
94 $morehtmlref .= $form->editfieldkey(
"Label",
'label',
$object->label, $object, 0,
'string',
'', 0, 1);
95 $morehtmlref .= $form->editfieldval(
"Label",
'label',
$object->label, $object, 0,
'string',
'',
null,
null,
'', 1);
97 if (isModEnabled(
'project')) {
98 $langs->loadLangs(array(
"projects"));
99 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' : ';
100 if ($user->hasRight(
'loan',
'write')) {
103 if ($action ==
'classify') {
105 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
106 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
107 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
108 $morehtmlref .= $formproject->select_projects(
$object->socid,
$object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
109 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
110 $morehtmlref .=
'</form>';
112 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid,
$object->fk_project,
'none', 0, 0, 0, 1,
'',
'maxwidth300');
115 if (!empty(
$object->fk_project)) {
117 $proj->fetch(
$object->fk_project);
118 $morehtmlref .=
' : '.$proj->getNomUrl(1);
120 $morehtmlref .=
' - '.$proj->title;
127 $morehtmlref .=
'</div>';
129 $linkback =
'<a href="'.DOL_URL_ROOT.
'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
131 $object->totalpaid = $totalpaid;
133 $morehtmlstatus = $morehtmlright;
134 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
136 print
'<div class="fichecenter">';
137 print
'<div class="underbanner clearboth"></div>';
139 $cssclass =
'titlefield';
140 $permission = $user->hasRight(
'loan',
'write');
141 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.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 projects.
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
loan_prepare_head($object)
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.