27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/loan/class/loan.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/loan.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
31if (isModEnabled(
'project')) {
32 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
36$langs->loadLangs(array(
"compta",
"bills",
"loan"));
39$action =
GETPOST(
'action',
'aZ09');
44 $socid = $user->socid;
55$title = $langs->trans(
"Loan").
' - '.$langs->trans(
"Info");
56$help_url =
'EN:Module_Loan|FR:Module_Emprunt';
67$morehtmlref =
'<div class="refidno">';
69$morehtmlref .= $form->editfieldkey(
"Label",
'label',
$object->label, $object, 0,
'string',
'', 0, 1);
70$morehtmlref .= $form->editfieldval(
"Label",
'label',
$object->label, $object, 0,
'string',
'',
null,
null,
'', 1);
72if (isModEnabled(
'project')) {
73 $langs->load(
"projects");
74 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' : ';
75 if ($user->hasRight(
'loan',
'write')) {
78 if ($action ==
'classify') {
80 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
81 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
82 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
83 $morehtmlref .= $formproject->select_projects(
$object->socid,
$object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
84 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
85 $morehtmlref .=
'</form>';
87 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid,
$object->fk_project,
'none', 0, 0, 0, 1,
'',
'maxwidth300');
90 if (!empty(
$object->fk_project)) {
92 $proj->fetch(
$object->fk_project);
93 $morehtmlref .=
' : '.$proj->getNomUrl(1);
95 $morehtmlref .=
' - '.$proj->title;
102$morehtmlref .=
'</div>';
104$linkback =
'<a href="'.DOL_URL_ROOT.
'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
106$morehtmlstatus = $morehtmlright;
107dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
109print
'<div class="fichecenter">';
110print
'<div class="underbanner clearboth"></div>';
114print
'<table width="100%"><tr><td>';
116print
'</td></tr></table>';
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.
dol_print_object_info($object, $usetable=0)
Show information on an object TODO Move this into html.formother.
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.
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.