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');
64$reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
69 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
79$title = $langs->trans(
"Loan").
' - '.$langs->trans(
"Notes");
80$help_url =
'EN:Module_Loan|FR:Module_Emprunt';
82llxHeader(
"", $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-loan page-card_note');
88 $totalpaid =
$object->getSumPayment();
94 $morehtmlref =
'<div class="refidno">';
96 $morehtmlref .= $form->editfieldkey(
"Label",
'label',
$object->label, $object, 0,
'string',
'', 0, 1);
97 $morehtmlref .= $form->editfieldval(
"Label",
'label',
$object->label, $object, 0,
'string',
'',
null,
null,
'', 1);
99 if (isModEnabled(
'project')) {
100 $langs->loadLangs(array(
"projects"));
101 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' : ';
102 if ($user->hasRight(
'loan',
'write')) {
105 if ($action ==
'classify') {
107 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
108 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
109 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
110 $morehtmlref .= $formproject->select_projects(
$object->socid,
$object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
111 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
112 $morehtmlref .=
'</form>';
114 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid,
$object->fk_project,
'none', 0, 0, 0, 1,
'',
'maxwidth300');
117 if (!empty(
$object->fk_project)) {
119 $proj->fetch(
$object->fk_project);
120 $morehtmlref .=
' : '.$proj->getNomUrl(1);
122 $morehtmlref .=
' - '.$proj->title;
129 $morehtmlref .=
'</div>';
131 $linkback =
'<a href="'.DOL_URL_ROOT.
'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
133 $object->totalpaid = $totalpaid;
135 $morehtmlstatus = $morehtmlright;
136 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
138 print
'<div class="fichecenter">';
139 print
'<div class="underbanner clearboth"></div>';
141 $cssclass =
'titlefield';
142 $permission = $user->hasRight(
'loan',
'write');
143 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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage projects.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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.