//// ERROR CHECKING ///////////////////////
    // make sure the quote ID submitted really exists
    $sql_obj = new sql_query();
    $sql_obj->string = "SELECT id FROM account_quotes WHERE id='" . $journal->structure["customid"] . "'";
    $sql_obj->execute();
    if (!$sql_obj->num_rows()) {
        $_SESSION["error"]["message"][] = "Unable to find requested quote/transaction to modify journal for.";
    }
    /// if there was an error, go back to the entry page
    if ($_SESSION["error"]["message"]) {
        $_SESSION["error"]["form"]["journal_edit"] = "failed";
        header("Location: ../../index.php?page=accounts/quotes/journal.php&id=" . $journal->structure["customid"] . "&journalid=" . $journal->structure["id"] . "&action=" . $journal->structure["action"] . "");
        exit(0);
    } else {
        if ($journal->structure["action"] == "delete") {
            $journal->action_delete();
        } else {
            // update or create
            $journal->action_update();
        }
        // display updated details
        header("Location: ../../index.php?page=accounts/quotes/journal.php&id=" . $journal->structure["customid"] . "");
        exit(0);
    }
    /////////////////////////
} else {
    // user does not have perms to view this page/isn't logged on
    error_render_noperms();
    header("Location: ../../index.php?page=message.php");
    exit(0);
}