[freeside-commits] freeside/httemplate/search cust_main-zip.html, 1.3, 1.3.6.1 report_cust_main-zip.html, 1.6, 1.6.4.1

Ivan,,, ivan at wavetail.420.am
Mon Mar 15 18:00:43 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv29764

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	cust_main-zip.html report_cust_main-zip.html 
Log Message:
w/svc_whatever option on zip code distribution report, RT#7784

Index: report_cust_main-zip.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_main-zip.html,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -w -d -r1.6 -r1.6.4.1
--- report_cust_main-zip.html	10 Dec 2008 21:43:43 -0000	1.6
+++ report_cust_main-zip.html	16 Mar 2010 01:00:41 -0000	1.6.4.1
@@ -20,7 +20,7 @@
       </TR>
 
       <TR>
-        <TD ALIGN="right">Show customers with status:</TD>
+        <TD ALIGN="right">Show customers with status</TD>
         <TD>
           <SELECT NAME="status">
             <OPTION VALUE="">all
@@ -33,6 +33,23 @@
         </TD>
       </TR>
 
+      <TR>
+        <TD ALIGN="right">Limit to customers with provisioned service</TD>
+        <TD>
+          <SELECT NAME="svcdb">
+            <OPTION VALUE="">(no)
+            <OPTION VALUE="svc_acct">Account (svc_acct)
+            <OPTION VALUE="svc_broadband">Broadband service (svc_broadband)
+            <OPTION VALUE="svc_domain">Domain (svc_domain)
+            <OPTION VALUE="svc_external">External service (svc_external)
+            <OPTION VALUE="svc_forward">Mail forward (svc_foward)
+            <OPTION VALUE="svc_pbx">PBX (svc_pbx)
+            <OPTION VALUE="svc_phone">Phone number (svc_phone)
+            <OPTION VALUE="svc_www">Hosting (svc_www)
+          </SELECT>
+        </TD>
+      </TR>
+
       <% include( '/elements/tr-select-agent.html',
                      'curr_value'    => scalar( $cgi->param('agentnum') ),
                      'label'         => 'For agent: ',

Index: cust_main-zip.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main-zip.html,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -w -d -r1.3 -r1.3.6.1
--- cust_main-zip.html	3 Feb 2007 11:36:30 -0000	1.3
+++ cust_main-zip.html	16 Mar 2010 01:00:41 -0000	1.3.6.1
@@ -32,6 +32,17 @@
   $agentnum = $1;
   push @where, "cust_main.agentnum = $agentnum";
 }
+
+# select svcdb
+
+if ( $cgi->param('svcdb') =~ /^(\w+)$/ ) {
+  my $svcdb = $1;
+  push @where, "EXISTS( SELECT 1 FROM $svcdb LEFT JOIN cust_svc USING ( svcnum )
+                                             LEFT JOIN cust_pkg USING ( pkgnum )
+                          WHERE cust_pkg.custnum = cust_main.custnum
+                      )";
+}
+
 my $where = scalar(@where) ? 'WHERE '. join(' AND ', @where) : '';
 
 # bill zip vs ship zip



More information about the freeside-commits mailing list