Ejemplo n.º 1
0
$sql .= " WHERE rowid=" . $rowid;
$sql .= " ORDER BY dateo ASC";
$result = $db->query($sql);
if ($result) {
    $i = 0;
    $total = 0;
    if ($db->num_rows($result)) {
        $objp = $db->fetch_object($result);
        $total = $total + $objp->amount;
        $acct = new Account($db);
        $acct->fetch($objp->fk_account);
        $account = $acct->id;
        $bankline = new AccountLine($db);
        $bankline->fetch($rowid, $ref);
        $links = $acct->get_url($rowid);
        $bankline->load_previous_next_ref('', 'rowid');
        // Confirmations
        if ($action == 'delete_categ') {
            print $form->formconfirm($_SERVER['PHP_SELF'] . "?rowid=" . $rowid . "&cat1=" . GETPOST("fk_categ") . "&orig_account=" . $orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
        }
        print '<form name="update" method="POST" action="' . $_SERVER['PHP_SELF'] . '?rowid=' . $rowid . '">';
        print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        print '<input type="hidden" name="action" value="update">';
        print '<input type="hidden" name="orig_account" value="' . $orig_account . '">';
        print '<input type="hidden" name="id" value="' . $acct->id . '">';
        print '<table class="border" width="100%">';
        $linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/search.php">' . $langs->trans("BackToList") . '</a>';
        // Ref
        print '<tr><td width="20%">' . $langs->trans("Ref") . "</td>";
        print '<td colspan="4">';
        print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');