Exemple #1
0
// Used by the include of actions_setnotes.inc.php
/*
 *  Actions
 */
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not include_once
/*
 *  View
 */
$form = new Form($db);
llxHeader('', $langs->trans("LoanArea") . ' - ' . $langs->trans("Notes"), '');
if ($id > 0) {
    /*
     * Affichage onglets
     */
    $head = loan_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("Loan"), 0, 'loan');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="25%">' . $langs->trans('Ref') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'id', '', '', 'rowid', 'ref');
    print '</td></tr>';
    // Name
    print '<tr><td width="20%">' . $langs->trans("Name") . '</td>';
    print '<td colspan="3">' . $object->label . '</td></tr>';
    print "</table>";
    print '<br>';
    $colwidth = '25';
Exemple #2
0
$langs->load("compta");
$langs->load("bills");
$langs->load("loan");
$id = GETPOST('id', 'int');
$action = GETPOST("action");
// Security check
$socid = GETPOST('socid', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'loan', $id, '', '');
/*
 * View
 */
$help_url = 'EN:Module_Loan|FR:Module_Emprunt';
llxHeader("", $langs->trans("Loan"), $help_url);
if ($id > 0) {
    $loan = new Loan($db);
    $loan->fetch($id);
    $loan->info($id);
    $head = loan_prepare_head($loan);
    dol_fiche_head($head, 'info', $langs->trans("Loan"), 0, 'bill');
    print '<table width="100%"><tr><td>';
    dol_print_object_info($loan);
    print '</td></tr></table>';
    print '</div>';
} else {
    // $id ?
}
llxFooter();
$db->close();