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';
46$action =
GETPOST(
'action',
'aZ09');
49$langs->loadLangs(array(
"loan"));
54$hookmanager->initHooks(array(
'loannote'));
62$permissionnote = $user->hasRight(
'loan',
'write');
71$reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
76 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
87$title = $langs->trans(
"Loan").
' - '.$langs->trans(
"Notes");
88$help_url =
'EN:Module_Loan|FR:Module_Emprunt';
90llxHeader(
"", $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-loan page-card_note');
96 $totalpaid =
$object->getSumPayment();
102 $morehtmlref =
'<div class="refidno">';
104 $morehtmlref .= $form->editfieldkey(
"Label",
'label',
$object->label, $object, 0,
'string',
'', 0, 1);
105 $morehtmlref .= $form->editfieldval(
"Label",
'label',
$object->label, $object, 0,
'string',
'',
null,
null,
'', 1);
107 if (isModEnabled(
'project')) {
108 $langs->loadLangs(array(
"projects"));
109 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' : ';
110 if ($user->hasRight(
'loan',
'write')) {
113 if ($action ==
'classify') {
115 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
116 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
117 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
118 $morehtmlref .= $formproject->select_projects(
$object->socid,
$object->fk_project,
'projectid', 16, 0, 1, 0, 1, 0, 0,
'', 1);
119 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
120 $morehtmlref .=
'</form>';
122 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid,
$object->fk_project,
'none', 0, 0, 0, 1,
'',
'maxwidth300');
125 if (!empty(
$object->fk_project)) {
127 $proj->fetch(
$object->fk_project);
128 $morehtmlref .=
' : '.$proj->getNomUrl(1);
130 $morehtmlref .=
' - '.$proj->title;
137 $morehtmlref .=
'</div>';
139 $linkback =
'<a href="'.DOL_URL_ROOT.
'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
141 $object->totalpaid = $totalpaid;
143 $morehtmlstatus = $morehtmlright;
144 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
146 print
'<div class="fichecenter">';
147 print
'<div class="underbanner clearboth"></div>';
149 $cssclass =
'titlefield';
150 $permission = $user->hasRight(
'loan',
'write');
151 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.