From 0057896b8b8abb1e74091f56a2946b6d3b557e82 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 27 Sep 2020 01:28:34 +0200 Subject: [PATCH] [0004964] Balance Sheet Drilldown, Profit and Loss Drilldown: Fixed invalid navigation via Back links. --- gl/inquiry/balance_sheet.php | 9 +++++---- gl/inquiry/profit_loss.php | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gl/inquiry/balance_sheet.php b/gl/inquiry/balance_sheet.php index e2cd1075..6479ff83 100644 --- a/gl/inquiry/balance_sheet.php +++ b/gl/inquiry/balance_sheet.php @@ -138,9 +138,9 @@ function display_balance_sheet() { global $path_to_root; - $from = begin_fiscalyear(); $to = $_POST['TransToDate']; - + $from = get_fiscalyear_begin_for_date($to); + if (!isset($_POST['Dimension'])) $_POST['Dimension'] = 0; if (!isset($_POST['Dimension2'])) @@ -252,7 +252,8 @@ function display_balance_sheet() $convert, $dimension, $dimension2, $drilldown); } - end_table(1); // outer table + end_table(); // outer table + hyperlink_params($_SERVER['PHP_SELF'], _("Back"), "TransFromDate=". $from . "&TransToDate=" . $to . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2); div_end(); } @@ -266,5 +267,5 @@ display_balance_sheet(); end_form(); -end_page(); +end_page(false, true); diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index 1543bddc..801fb6aa 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -323,7 +323,8 @@ function display_profit_and_loss($compare) } - end_table(1); // outer table + end_table(); // outer table + hyperlink_params($_SERVER['PHP_SELF'], _("Back"), "TransFromDate=". $from . "&TransToDate=" . $to . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2); div_end(); } @@ -337,5 +338,5 @@ display_profit_and_loss(get_post('Compare')); end_form(); -end_page(); +end_page(false, true); -- 2.30.2