1 <% include('/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 BGCOLOR="#e8e8e8" 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 % # just this customer's domains?
21 <% include( '/elements/tr-select-domain.html',
22 'element_name' => 'domsvc',
23 'curr_value' => scalar( $cgi->param('domsvc') ),
29 <SCRIPT type="text/javascript">
30 function toggle(what) {
31 label = document.getElementById (what + '_label');
32 field = document.getElementById ( what + '_invert');
33 if (field.value == 1) {
38 if (field.value == 1) {
39 label.firstChild.nodeValue = 'Did not ' + label.firstChild.nodeValue;
41 text = label.firstChild.nodeValue;
42 label.firstChild.nodeValue = text.replace(/Did not /, '');
46 % foreach my $field (qw( last_login last_logout )) {
47 % my $invert = $field."_invert";
53 <TD ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
57 <INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
58 <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;">Invert</A>
65 <% include( '/elements/tr-input-beginning_ending.html',
76 <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %>
79 <TH BGCOLOR="#e8e8e8" COLSPAN=2> </TH>
83 <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
85 <% include( '/elements/tr-select-cust-fields.html' ) %>
90 <INPUT TYPE="submit" VALUE="Get Report">
94 <% include('/elements/footer.html') %>
98 unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
100 my $title = 'Account Report';
102 #false laziness w/report_cust_pkg.html
104 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
106 my $cust_main = qsearchs({
107 'table' => 'cust_main',
108 'hashref' => { 'custnum' => $custnum },
109 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
110 }) or die "unknown custnum $custnum";
111 $title .= ': '. $cust_main->name;
118 'last_login' => 'Last login',
119 'last_logout' => 'Last logout',