X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fprofit_loss.php;h=1e236159a2f8172bf0b447f36d084e096817db75;hb=c8145b03ed9754bd9552ccdac38b41b73550a69f;hp=f7ba91767c1055bc9b1282c5f8830d58d90f76e1;hpb=7eb7d3b1b680e17ba618b1a3f670f335eceb330e;p=fa-stable.git diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index f7ba9176..1e236159 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -21,7 +21,7 @@ include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); $js = ""; -if ($use_date_picker) +if (user_use_date_picker()) $js = get_js_date_picker(); page(_($help_context = "Profit & Loss Drilldown"), false, false, "", $js); @@ -160,7 +160,12 @@ function inquiry_controls() $dim = get_company_pref('use_dimension'); start_table(TABLESTYLE_NOBORDER); - date_cells(_("From:"), 'TransFromDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days()); + $date = today(); + if (!isset($_POST['TransToDate'])) + $_POST['TransToDate'] = end_month($date); + if (!isset($_POST['TransFromDate'])) + $_POST['TransFromDate'] = add_days(end_month($date), -$_SESSION["wa_current_user"]->prefs->transaction_days()); + date_cells(_("From:"), 'TransFromDate'); date_cells(_("To:"), 'TransToDate'); //Compare Combo @@ -335,4 +340,3 @@ end_form(); end_page(); -?> \ No newline at end of file