Removed many global variables from config.default.php to GL Setup, Company Setup...
[fa-stable.git] / gl / inquiry / bank_inquiry.php
index 30380989c73ab95a6a557a55b34587a00e95dfa2..4c25ddd270f782477c6ba2fb36e850e6a39b5653 100644 (file)
@@ -23,7 +23,7 @@ include_once($path_to_root . "/includes/banking.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
-if ($use_date_picker)
+if (user_use_date_picker())
        $js .= get_js_date_picker();
 page(_($help_context = "Bank Statement"), isset($_GET['bank_account']), false, "", $js);
 
@@ -46,7 +46,7 @@ start_table(TABLESTYLE_NOBORDER);
 start_row();
 bank_accounts_list_cells(_("Account:"), 'bank_account', null);
 
-date_cells(_("From:"), 'TransAfterDate', '', null, -30);
+date_cells(_("From:"), 'TransAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
 date_cells(_("To:"), 'TransToDate');
 
 submit_cells('Show',_("Show"),'','', 'default');
@@ -68,7 +68,7 @@ display_heading($act['bank_account_name']." - ".$act['bank_curr_code']);
 start_table(TABLESTYLE);
 
 $th = array(_("Type"), _("#"), _("Reference"), _("Date"),
-       _("Debit"), _("Credit"), _("Balance"), _("Person/Item"), "");
+       _("Debit"), _("Credit"), _("Balance"), _("Person/Item"), _("Memo"), "");
 table_header($th);
 
 $bfw = get_balance_before_for_bank_account($_POST['bank_account'], $_POST['TransAfterDate']);
@@ -103,6 +103,7 @@ while ($myrow = db_fetch($result))
        display_debit_or_credit_cells($myrow["amount"]);
        amount_cell($running_total);
        label_cell(get_counterparty_name($myrow["type"], $myrow["trans_no"]));
+       label_cell(get_comments_string($myrow["type"], $myrow["trans_no"]));
        label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"]));
        end_row();
        if ($myrow["amount"] > 0 )