$js = "";
if ($use_popup_windows)
$js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+ $js .= get_js_date_picker();
page(_("Bank Statement"), false, false, "", $js);
check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
+//-----------------------------------------------------------------------------------
+// Ajax updates
+//
+if (get_post('Show'))
+{
+ $Ajax->activate('trans_tbl');
+}
//------------------------------------------------------------------------------------------------
start_form();
-
start_table("class='tablestyle_noborder'");
start_row();
bank_accounts_list_cells(_("Account:"), 'bank_account', null);
-date_cells(_("From:"), 'TransAfterDate', null, -30);
+date_cells(_("From:"), 'TransAfterDate', '', null, -30);
date_cells(_("To:"), 'TransToDate');
-submit_cells('Show',_("Show"));
+submit_cells('Show',_("Show"),'','', true);
end_row();
end_table();
end_form();
$result = db_query($sql,"The transactions for '" . $_POST['bank_account'] . "' could not be retrieved");
+div_start('trans_tbl');
$act = get_bank_account($_POST["bank_account"]);
display_heading($act['bank_account_name']." - ".$act['bank_curr_code']);
$th = array(_("Type"), _("#"), _("Reference"), _("Type"), _("Date"),
_("Debit"), _("Credit"), _("Balance"), _("Person/Item"), "");
-table_header($th);
+table_header($th);
$sql = "SELECT SUM(amount) FROM ".TB_PREF."bank_trans WHERE bank_act='" . $_POST['bank_account'] . "'
AND trans_date < '$date_after'";
$running_total = $bfw;
$j = 1;
$k = 0; //row colour counter
-while ($myrow = db_fetch($result))
+while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
if ($j == 12)
{
$j = 1;
- table_header($th);
+ table_header($th);
}
$j++;
}
label_cell("");
end_row();
end_table(2);
-
+div_end();
//------------------------------------------------------------------------------------------------
end_page();