Period presentation bug in tax report/inquiry
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 10 May 2009 12:50:41 +0000 (12:50 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 10 May 2009 12:50:41 +0000 (12:50 +0000)
CHANGELOG.txt
gl/inquiry/tax_inquiry.php
reporting/includes/reports_classes.inc

index 027d3543e05857d2171b0497be57d45994d915c0..dae7f9c475784841bbfd7eb1929e131ce11c0cdb 100644 (file)
@@ -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
index df9cd14beb996f55fb34f3c2e2dc9b62d1929a4d..c68ddabbe526bba0d16caf55793444a90c5c6e45 100644 (file)
@@ -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;
 }      
 
index 363e2284ad8015593a45621d38ef865af714abf7..3d8699801d52c18c3f7e405ceaafb074bcd33cfe 100644 (file)
@@ -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";