Release 2.3.2
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 13 Feb 2011 22:44:56 +0000 (22:44 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 13 Feb 2011 22:44:56 +0000 (22:44 +0000)
A global variable in config.php, $show_voided_gl_trans = 1 shows 0 amount
transactions in gl inquiry and reports.

CHANGELOG.txt
config.default.php
gl/includes/db/gl_db_trans.inc
version.php

index ca56246c0b78bce088aab9ecb0c190904033d479..eca31f65730a05f09d35f17420b96e07d2b2ee12 100644 (file)
@@ -19,7 +19,15 @@ Legend:
 ! -> Note
 $ -> Affected files
 
-
+------------------------------- Release 2.3.2 ------------------------------------
+13-Feb-2011 Joe Hunt
+! Release 2.3.2
+$ version.php
+! A global variable in config.php, $show_voided_gl_trans = 1 shows 0 amount 
+  transactions in gl inquiry and reports.
+$ /config.default.php
+  /gl/includes/db/gl_db_trans.inc
+  .
 13-Feb-2011 Janusz Dobrowolski
 ! Updated gettext template
 $ /lang/new_language_template/LC_MESSAGES/empty.po
index 6705918f5be30bc876144d02a1c1065832b66c27..1d45c8b3aae8d61b7efcc2cc6f3a608bfda592b3 100644 (file)
@@ -80,6 +80,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
        /* use Audit Trails in GL */
        $use_audit_trail = 0;
 
+       /* $show_voiced_gl_trans = 0, setting this to 1 will show the voided gl trans */
+       $show_voided_gl_trans = 0;
+       
        /* use old style convert (income and expense in BS, PL) */
        $use_oldstyle_convert = 0;
 
index 7677fa3ec328042f5ed988f47db09d8acab7c552..831ff3d301d23ff00ce082b7b76ca36a6ccf67fb 100644 (file)
@@ -100,6 +100,8 @@ function get_gl_transactions($from_date, $to_date, $trans_no=0,
        $account=null, $dimension=0, $dimension2=0, $filter_type=null,
        $amount_min=null, $amount_max=null)
 {
+       global $show_voided_gl_trans;
+       
        $from = date2sql($from_date);
        $to = date2sql($to_date);
 
@@ -113,6 +115,8 @@ function get_gl_transactions($from_date, $to_date, $trans_no=0,
                AND ISNULL(v.date_)
                AND tran_date >= '$from'
                AND tran_date <= '$to'";
+       if (isset($show_voided_gl_trans) && $show_voided_gl_trans == 1)
+               $sql .= " AND ".TB_PREF."gl_trans.amount <> 0"; 
        if ($trans_no > 0)
                $sql .= " AND ".TB_PREF."gl_trans.type_no LIKE ".db_escape('%'.$trans_no);
 
index a3a9b12a4b218148fa6c3302444c794a31129b8f..72cb44f0f8c7576637d51e265138bf7184ebdf52 100644 (file)
@@ -9,7 +9,7 @@ $db_version = "2.3rc";
 
 // application version - can be overriden in config.php
 if (!isset($version))
-       $version                = "2.3.1";
+       $version                = "2.3.2";
 
 //======================================================================
 // Extension packages repository settings