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-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=73fbbc13b534d25158d7089b815092d5e3329126;p=textcart.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 5373884..40456a1 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 351fc3d..3e7a26f 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