<% include('/elements/header.html', $title ) %>
%# extensive false laziness with svc_acct % unless ( $custnum ) { <% include( '/elements/tr-select-agent.html', 'curr_value' => scalar( $cgi->param('agentnum') ), 'disable_empty' => 0, ) %> <% include( '/elements/tr-select-table.html', 'label' => 'Routers', 'table' => 'router', 'name_col' => 'routername', 'curr_value' => $routernum, 'hashref' => {}, 'multiple' => 'multiple', ) %> % } <% include( '/elements/tr-selectmultiple-part_pkg.html', %pkg_search, ) %> % #move to /elements/tr-select-cust_pkg-fields if anything else needs it... <% include( '/elements/tr-select-cust-fields.html' ) %>
Search options
 
Display options
Package fields

<% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #? my $title = 'Broadband Service Report'; my $routernum = [ $cgi->param('routernum') || '' ]; $routernum = join(',', @$routernum); #false laziness w/report_cust_pkg.html my $custnum = ''; if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { $custnum = $1; my $cust_main = qsearchs({ 'table' => 'cust_main', 'hashref' => { 'custnum' => $custnum }, 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, }) or die "unknown custnum $custnum"; $title .= ': '. $cust_main->name; } # exclude one-time charges, disabled packages, and packages with no # broadband services my %pkg_search = ( 'extra_sql' => " WHERE freq != '0' AND disabled IS NULL AND 0 < ( SELECT COUNT(*) FROM part_svc JOIN pkg_svc USING ( svcpart ) WHERE pkg_svc.pkgpart = part_pkg.pkgpart AND part_svc.svcdb = 'svc_broadband' AND pkg_svc.quantity > 0 )", ); <%once>