Ejemplo n.º 1
0
        Header("Location: ligne.php?id=" . $id);
        exit;
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("StandingOrder"));
$h = 0;
$head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/ligne.php?id=' . $id;
$head[$h][1] = $langs->trans("Card");
$hselected = $h;
$h++;
if ($id) {
    $lipre = new LignePrelevement($db, $user);
    if ($lipre->fetch($id) == 0) {
        $bon = new BonPrelevement($db);
        $bon->fetch($lipre->bon_rowid);
        dol_fiche_head($head, $hselected, $langs->trans("StandingOrder"));
        print '<table class="border" width="100%">';
        print '<tr><td width="20%">' . $langs->trans("WithdrawalReceipt") . '</td><td>';
        print '<a href="fiche.php?id=' . $lipre->bon_rowid . '">' . $lipre->bon_ref . '</a></td></tr>';
        print '<tr><td width="20%">' . $langs->trans("Date") . '</td><td>' . dol_print_date($bon->datec, 'day') . '</td></tr>';
        print '<tr><td width="20%">' . $langs->trans("Amount") . '</td><td>' . price($lipre->amount) . '</td></tr>';
        print '<tr><td width="20%">' . $langs->trans("Status") . '</td><td>';
        print $lipre->LibStatut($lipre->statut, 1) . '</td></tr>';
        if ($lipre->statut == 3) {
            $rej = new RejetPrelevement($db, $user);
            $resf = $rej->fetch($lipre->id);
            if ($resf == 0) {
                print '<tr><td width="20%">' . $langs->trans("RefusedReason") . '</td><td>' . $rej->motif . '</td></tr>';