<& /elements/header.html, $title &>
<% emt('Search options') %> % unless ( $custnum ) { <& /elements/tr-select-agent.html, 'curr_value' => scalar( $cgi->param('agentnum') ), 'disable_empty' => 0, &> % # just this customer's domains? <& /elements/tr-select-domain.html, 'element_name' => 'domsvc', 'curr_value' => scalar( $cgi->param('domsvc') ), 'disable_empty' => 0, &> % } % foreach my $field (qw( last_login last_logout )) { % my $invert = $field."_invert"; % } <& /elements/tr-selectmultiple-part_pkg.html &> <& /elements/tr-select-part_svc.html, svcdb=>'svc_acct' &> % my $conf = new FS::Conf; % if ( $conf->exists('svc_acct-tower_sector') % and FS::tower_sector->count > 0 ) { <& /elements/tr-select-tower_sector.html, 'multiple' => 1, 'label' => 'Tower/Sector', &> % }
"> <% $label{$field} %> <% mt('Invert') |h %>
<& /elements/tr-input-beginning_ending.html, prefix => $field, layout => 'horiz', &>

<% emt('Display options') %> % #move to /elements/tr-select-cust_pkg-fields if anything else needs it... <& /elements/tr-select-cust-fields.html &>
<% mt('Package fields') |h %>

<& /elements/footer.html &> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Services: Accounts: Advanced search'); #? my $title = mt('Account Report'); #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 = mt("Account Report: [_1]", $cust_main->name); } <%once> my %label = ( 'last_login' => 'Last login', 'last_logout' => 'Last logout', );