X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fbank_inquiry.php;h=f6ffdba757a156d37ee6bb207f94a5ac2e18ff54;hb=d984052f31e45bfdec6a308dfe189e515f30fd35;hp=1ff071592c037c7d3c9564742426ca35a2ab5ed4;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index 1ff07159..f6ffdba7 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -14,22 +14,30 @@ include_once($path_to_root . "/includes/banking.inc"); $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(); @@ -50,6 +58,7 @@ $sql = "SELECT ".TB_PREF."bank_trans.*,name AS BankTransType FROM ".TB_PREF."ban $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']); @@ -57,7 +66,7 @@ start_table($table_style); $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'"; @@ -74,7 +83,7 @@ end_row(); $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); @@ -96,7 +105,7 @@ while ($myrow = db_fetch($result)) if ($j == 12) { $j = 1; - table_header($th); + table_header($th); } $j++; } @@ -108,7 +117,7 @@ display_debit_or_credit_cells($running_total); label_cell(""); end_row(); end_table(2); - +div_end(); //------------------------------------------------------------------------------------------------ end_page();