Example #1
0
}
$object = new PaymentSalary($db);
$object->fetch($id, $ref);
$upload_dir = $conf->salaries->dir_output . '/' . dol_sanitizeFileName($object->id);
$modulepart = 'salaries';
/*
 * Actions
 */
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
/*
 * View
 */
$form = new Form($db);
llxHeader("", "", $langs->trans("SalaryPayment"));
if ($object->id) {
    $object->fetch_thirdparty();
    $head = salaries_prepare_head($object);
    dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), 0, 'payment');
    // Construit liste des fichiers
    $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\\.meta|_preview\\.png)$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
    $totalsize = 0;
    foreach ($filearray as $key => $file) {
        $totalsize += $file['size'];
    }
    print '<table class="border" width="100%">';
    $linkback = '<a href="' . DOL_URL_ROOT . '/compta/salaries/index.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
    // Ref
    print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td>';
    print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
    print '</td></tr>';
    // Societe