Пример #1
0
    session_register("deposit_items");
    $_SESSION['deposit_items'] = new items_cart();
    $_POST['date_'] = Today();
    if (!is_date_in_fiscalyear($_POST['date_'])) {
        $_POST['date_'] = end_fiscalyear();
    }
    $_SESSION['deposit_items']->tran_date = $_POST['date_'];
}
//-----------------------------------------------------------------------------------------------
if (isset($_POST['Process'])) {
    $input_error = 0;
    if (!references::is_valid($_POST['ref'])) {
        display_error(tr("You must enter a reference."));
        set_focus('ref');
        $input_error = 1;
    } elseif (!is_new_reference($_POST['ref'], systypes::bank_deposit())) {
        display_error(tr("The entered reference is already in use."));
        set_focus('ref');
        $input_error = 1;
    }
    if (!is_date($_POST['date_'])) {
        display_error(tr("The entered date for the deposit is invalid."));
        set_focus('date_');
        $input_error = 1;
    }
    if (!is_date_in_fiscalyear($_POST['date_'])) {
        display_error(tr("The entered date is not in fiscal year."));
        set_focus('date_');
        $input_error = 1;
    }
    if ($input_error == 1) {
Пример #2
0
    label_cells(tr("Currency"), $to_trans['bank_curr_code'], "class='tableheader2'");
}
label_cells(tr("Amount"), number_format2($to_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right");
label_cells(tr("Date"), sql2date($to_trans['trans_date']), "class='tableheader2'");
end_row();
start_row();
label_cells(tr("From"), payment_person_types::person_name($to_trans['person_type_id'], $to_trans['person_id']), "class='tableheader2'", "colspan={$colspan1}");
label_cells(tr("Deposit Type"), $to_trans['BankTransType'], "class='tableheader2'");
end_row();
start_row();
label_cells(tr("Reference"), $to_trans['ref'], "class='tableheader2'", "colspan={$colspan2}");
end_row();
comments_display_row(systypes::bank_deposit(), $trans_no);
end_table(1);
is_voided_display(systypes::bank_deposit(), $trans_no, tr("This deposit has been voided."));
$items = get_gl_trans(systypes::bank_deposit(), $trans_no);
if (db_num_rows($items) == 0) {
    echo "<br>" . tr("There are no items for this deposit.");
} else {
    display_heading2(tr("Items for this Deposit"));
    if ($show_currencies) {
        display_heading2(tr("Item Amounts are Shown in :") . " " . $company_currency);
    }
    start_table("{$table_style} width=80%");
    $th = array(tr("Account Code"), tr("Account Description"), tr("Amount"), tr("Memo"));
    table_header($th);
    $k = 0;
    //row colour counter
    $total_amount = 0;
    while ($item = db_fetch($items)) {
        if ($item["account"] != $to_trans["account_code"]) {