1 <% include('/elements/header.html', $title ) %>
3 <FORM ACTION="svc_broadband.cgi" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="advanced">
5 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
6 %# extensive false laziness with svc_acct
7 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
10 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
13 % unless ( $custnum ) {
14 <% include( '/elements/tr-select-agent.html',
15 'curr_value' => scalar( $cgi->param('agentnum') ),
20 <% include( '/elements/tr-select-table.html',
23 'name_col' => 'routername',
24 'curr_value' => $routernum,
26 'multiple' => 'multiple',
31 <td><input type="checkbox" name="routernum" value="none" checked> Include services with no router</td>
34 <% include( '/elements/tr-selectmultiple-part_pkg.html',
39 % if ( FS::tower_sector->count > 0 ) {
40 <& /elements/tr-select-tower_sector.html,
42 'label' => 'Tower/Sector',
48 <TH CLASS="background" COLSPAN=2> </TH>
52 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
55 % #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
57 <TD ALIGN="right">Package fields</TD>
59 <SELECT NAME="cust_pkg_fields">
60 <OPTION VALUE="">(none)
61 <OPTION VALUE="setup,last_bill,bill,cancel">Setup date | Last bill date | Next bill date | Cancel date
66 <% include( '/elements/tr-select-cust-fields.html' ) %>
71 <INPUT TYPE="submit" VALUE="Get Report">
75 <% include('/elements/footer.html') %>
79 unless $FS::CurrentUser::CurrentUser->access_right('Services: Wireless broadband services: Advanced search');
81 my $title = 'Broadband Service Report';
82 my $routernum = [ $cgi->param('routernum') || '' ];
83 $routernum = join(',', @$routernum);
85 #false laziness w/report_cust_pkg.html
87 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
89 my $cust_main = qsearchs({
90 'table' => 'cust_main',
91 'hashref' => { 'custnum' => $custnum },
92 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
93 }) or die "unknown custnum $custnum";
94 $title .= ': '. $cust_main->name;
97 # exclude one-time charges, disabled packages, and packages with no
101 WHERE freq != '0' AND disabled IS NULL AND 0 < (
102 SELECT COUNT(*) FROM part_svc JOIN pkg_svc USING ( svcpart )
103 WHERE pkg_svc.pkgpart = part_pkg.pkgpart AND part_svc.svcdb = 'svc_broadband'
104 AND pkg_svc.quantity > 0