1 <& /elements/header.html, $title &>
3 <FORM ACTION="svc_acct.cgi" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="advanced">
5 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
7 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
10 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Search options') |h %></FONT></TH>
13 % unless ( $custnum ) {
14 <& /elements/tr-select-agent.html,
15 'curr_value' => scalar( $cgi->param('agentnum') ),
19 % # just this customer's domains?
20 <& /elements/tr-select-domain.html,
21 'element_name' => 'domsvc',
22 'curr_value' => scalar( $cgi->param('domsvc') ),
27 <SCRIPT type="text/javascript">
28 function toggle(what) {
29 label = document.getElementById (what + '_label');
30 field = document.getElementById ( what + '_invert');
31 if (field.value == 1) {
36 if (field.value == 1) {
37 label.firstChild.nodeValue = 'Did not ' + label.firstChild.nodeValue;
39 text = label.firstChild.nodeValue;
40 label.firstChild.nodeValue = text.replace(/Did not /, '');
44 % foreach my $field (qw( last_login last_logout )) {
45 % my $invert = $field."_invert";
51 <TD ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
55 <INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
56 <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;"><% mt('Invert') |h %></A>
63 <& /elements/tr-input-beginning_ending.html,
73 <& /elements/tr-selectmultiple-part_pkg.html &>
75 % my $conf = new FS::Conf;
76 % if ( $conf->exists('svc_acct-tower_sector')
77 % and FS::tower_sector->count > 0 ) {
78 <& /elements/tr-select-tower_sector.html,
80 'label' => 'Tower/Sector',
86 <TH CLASS="background" COLSPAN=2> </TH>
90 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
93 % #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
95 <TD ALIGN="right"><% mt('Package fields') |h %></TD>
97 <SELECT NAME="cust_pkg_fields">
98 <OPTION VALUE=""><% mt('(none)') |h %>
99 <OPTION VALUE="setup,last_bill,bill,cancel"><% mt('Setup date | Last bill date | Next bill date | Cancel date') |h %>
104 <& /elements/tr-select-cust-fields.html &>
109 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
113 <& /elements/footer.html &>
117 unless $FS::CurrentUser::CurrentUser->access_right('Services: Accounts: Advanced search'); #?
119 my $title = mt('Account Report');
121 #false laziness w/report_cust_pkg.html
123 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
125 my $cust_main = qsearchs({
126 'table' => 'cust_main',
127 'hashref' => { 'custnum' => $custnum },
128 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
129 }) or die "unknown custnum $custnum";
130 $title = mt("Account Report: [_1]", $cust_main->name);
137 'last_login' => 'Last login',
138 'last_logout' => 'Last logout',