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 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 % # 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 CLASS="background" COLSPAN=2> </TH>
83 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
86 % #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
88 <TD ALIGN="right">Package fields</TD>
90 <SELECT NAME="cust_pkg_fields">
91 <OPTION VALUE="">(none)
92 <OPTION VALUE="setup,last_bill,bill,cancel">Setup date | Last bill date | Next bill date | Cancel date
97 <% include( '/elements/tr-select-cust-fields.html' ) %>
102 <INPUT TYPE="submit" VALUE="Get Report">
106 <% include('/elements/footer.html') %>
110 unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
112 my $title = 'Account Report';
114 #false laziness w/report_cust_pkg.html
116 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
118 my $cust_main = qsearchs({
119 'table' => 'cust_main',
120 'hashref' => { 'custnum' => $custnum },
121 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
122 }) or die "unknown custnum $custnum";
123 $title .= ': '. $cust_main->name;
130 'last_login' => 'Last login',
131 'last_logout' => 'Last logout',