X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fgl_account_inquiry.php;h=1fed9b30a95a90427b70a3ecde1d1dcd43c8829f;hb=c8145b03ed9754bd9552ccdac38b41b73550a69f;hp=6c66b08d6f1ce3e972693cbc85d08847149c2471;hpb=7fd6f0b781ed41d099f352ebdc2bbc0ee46750c6;p=fa-stable.git diff --git a/gl/inquiry/gl_account_inquiry.php b/gl/inquiry/gl_account_inquiry.php index 6c66b08d..1fed9b30 100644 --- a/gl/inquiry/gl_account_inquiry.php +++ b/gl/inquiry/gl_account_inquiry.php @@ -14,6 +14,7 @@ $path_to_root = "../.."; include_once($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/data_checks.inc"); @@ -24,7 +25,7 @@ $js = ''; set_focus('account'); 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 = "General Ledger Inquiry"), false, false, '', $js); @@ -66,13 +67,13 @@ function gl_inquiry_controls() start_table(TABLESTYLE_NOBORDER); start_row(); - gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, "All Accounts"); - date_cells(_("from:"), 'TransFromDate', '', null, -30); + gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, _("All Accounts")); + date_cells(_("from:"), 'TransFromDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days()); date_cells(_("to:"), 'TransToDate'); end_row(); end_table(); - start_table(); + start_table(TABLESTYLE_NOBORDER); start_row(); if ($dim >= 1) dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); @@ -148,7 +149,7 @@ function show_results() $begin = ""; else { - $begin = begin_fiscalyear(); + $begin = get_fiscalyear_begin_for_date($_POST['TransFromDate']); if (date1_greater_date2($begin, $_POST['TransFromDate'])) $begin = $_POST['TransFromDate']; $begin = add_days($begin, -1); @@ -193,6 +194,8 @@ function show_results() display_debit_or_credit_cells($myrow["amount"]); if ($show_balances) amount_cell($running_total); + if ($myrow['memo_'] == "") + $myrow['memo_'] = get_comments_string($myrow['type'], $myrow['type_no']); label_cell($myrow['memo_']); end_row(); @@ -235,4 +238,3 @@ div_end(); end_page(); -?>