From: Joe Hunt Date: Thu, 3 Jan 2013 15:08:56 +0000 (+0100) Subject: The on-screen reports Trial Balance and P&L Drilldown should follow the printed repor... X-Git-Tag: 2.3-final~359 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=183839aff4b89c6be4529ce6cd8a4d1d94194dfd;p=fa-stable.git The on-screen reports Trial Balance and P&L Drilldown should follow the printed reports periods. --- diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 53738843..40456a13 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -46,7 +46,12 @@ function gl_inquiry_controls() start_table(TABLESTYLE_NOBORDER); - date_cells(_("From:"), 'TransFromDate', '', null, -30); + $date = today(); + if (!isset($_POST['TransFromDate'])) + $_POST['TransFromDate'] = begin_month($date); + if (!isset($_POST['TransToDate'])) + $_POST['TransToDate'] = end_month($date); + date_cells(_("From:"), 'TransFromDate'); date_cells(_("To:"), 'TransToDate'); if ($dim >= 1) dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index 351fc3d7..3e7a26f4 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -160,7 +160,12 @@ function inquiry_controls() $dim = get_company_pref('use_dimension'); start_table(TABLESTYLE_NOBORDER); - date_cells(_("From:"), 'TransFromDate', '', null, -30); + $date = today(); + if (!isset($_POST['TransFromDate'])) + $_POST['TransFromDate'] = begin_month($date); + if (!isset($_POST['TransToDate'])) + $_POST['TransToDate'] = end_month($date); + date_cells(_("From:"), 'TransFromDate'); date_cells(_("To:"), 'TransToDate'); //Compare Combo