Filter for non-zero values in Bank Statement Report
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 31 Oct 2012 07:56:00 +0000 (08:56 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 31 Oct 2012 07:56:00 +0000 (08:56 +0100)
reporting/rep601.php
reporting/reports_main.php

index 1d47bc78a1510ca4e201862ab6cdff147e2709bb..4690ac615981c8d97287a28cbb8798abf1f99274 100644 (file)
@@ -59,8 +59,9 @@ function print_bank_transactions()
        $acc = $_POST['PARAM_0'];
        $from = $_POST['PARAM_1'];
        $to = $_POST['PARAM_2'];
-       $comments = $_POST['PARAM_3'];
-       $destination = $_POST['PARAM_4'];
+       $zero = $_POST['PARAM_3'];
+       $comments = $_POST['PARAM_4'];
+       $destination = $_POST['PARAM_5'];
        if ($destination)
                include_once($path_to_root . "/reporting/includes/excel_report.inc");
        else
@@ -112,6 +113,8 @@ function print_bank_transactions()
                        
                        while ($myrow=db_fetch($trans))
                        {
+                               if ($zero == 0 && $myrow['amount'] == 0.0)
+                                       continue;
                                $total += $myrow['amount'];
 
                                $rep->TextCol(0, 1, $systypes_array[$myrow["type"]]);
index ca27855618aaf47e3298a5fa06d0624075d365f1..adb550154e64c6418639e707690f0572dfa5f2cf 100644 (file)
@@ -238,6 +238,7 @@ $reports->addReportClass(_('Banking'), RC_BANKING);
        array(  _('Bank Accounts') => 'BANK_ACCOUNTS',
                        _('Start Date') => 'DATEBEGINM',
                        _('End Date') => 'DATEENDM',
+                       _('Zero values') => 'YES_NO',
                        _('Comments') => 'TEXTBOX',
                        _('Destination') => 'DESTINATION'));