[freeside-commits] freeside/httemplate/search cust_bill_pkg.cgi, 1.4, 1.5

Ivan,,, ivan at wavetail.420.am
Mon May 8 03:01:57 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv11969/httemplate/search

Modified Files:
	cust_bill_pkg.cgi 
Log Message:
sales report per agent and package class looks good

Index: cust_bill_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_bill_pkg.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cust_bill_pkg.cgi	26 Jan 2006 15:27:10 -0000	1.4
+++ cust_bill_pkg.cgi	8 May 2006 10:01:54 -0000	1.5
@@ -12,15 +12,23 @@
     LEFT JOIN part_pkg USING ( pkgpart )
 ";
 
-my $where = "
-  WHERE _date >= $beginning AND _date <= $ending
-    AND payby != 'COMP'
-";
+my $where = " WHERE _date >= $beginning AND _date <= $ending ";
+
+$where .= " AND payby != 'COMP' "
+  unless $cgi->param('include_comp_cust');
 
 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
   $where .= " AND agentnum = $1 ";
 }
 
+if ( $cgi->param('classnum') =~ /^(\d+)$/ ) {
+  if ( $1 == 0 ) {
+    $where .= " AND classnum IS NULL ";
+  } else {
+    $where .= " AND classnum = $1 ";
+  }
+}
+
 if ( $cgi->param('out') ) {
 
   $where .= "



More information about the freeside-commits mailing list