From e41d9f32739a4d895138feb772f7dccdde312dbd Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 10 May 2009 12:50:41 +0000 Subject: [PATCH] Period presentation bug in tax report/inquiry --- CHANGELOG.txt | 5 +++++ gl/inquiry/tax_inquiry.php | 5 +++-- reporting/includes/reports_classes.inc | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 027d3543..dae7f9c4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,11 @@ Legend: ! -> Note $ -> Affected files +10-May-2009 Joe Hunt +# Period presentation bug in tax report/inquiry +$ /gl/inquiry/tax_inquiry.php + /reporting/includes/reports_classes.inc + 07-May-2009 Joe Hunt # Layout bug in exchange rate display $ /includes/ui/ui_view.inc diff --git a/gl/inquiry/tax_inquiry.php b/gl/inquiry/tax_inquiry.php index df9cd14b..c68ddabb 100644 --- a/gl/inquiry/tax_inquiry.php +++ b/gl/inquiry/tax_inquiry.php @@ -43,8 +43,9 @@ if (get_post('TransFromDate') == "" && get_post('TransToDate') == "") $row = get_company_prefs(); $edate = add_months($date, -$row['tax_last']); $edate = end_month($edate); - $bdate = add_months($edate, -$row['tax_prd'] + 1); - $_POST["TransFromDate"] = begin_month($bdate); + $bdate = begin_month($edate); + $bdate = add_months($bdate, -$row['tax_prd'] + 1); + $_POST["TransFromDate"] = $bdate; $_POST["TransToDate"] = $edate; } diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index 363e2284..3d869980 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -160,8 +160,9 @@ class Report $date = $edate; else { - $bdate = add_months($edate, -$row['tax_prd'] + 1); - $date = begin_month($bdate); + $bdate = begin_month($edate); + $bdate = add_months($bdate, -$row['tax_prd'] + 1); + $date = $bdate; } } $name = "PARAM_$index"; -- 2.30.2