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 &>
76 <TH CLASS="background" COLSPAN=2> </TH>
80 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
83 % #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
85 <TD ALIGN="right"><% mt('Package fields') |h %></TD>
87 <SELECT NAME="cust_pkg_fields">
88 <OPTION VALUE=""><% mt('(none)') |h %>
89 <OPTION VALUE="setup,last_bill,bill,cancel"><% mt('Setup date | Last bill date | Next bill date | Cancel date') |h %>
94 <& /elements/tr-select-cust-fields.html &>
99 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
103 <& /elements/footer.html &>
107 unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
109 my $title = emt('Account Report');
111 #false laziness w/report_cust_pkg.html
113 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
115 my $cust_main = qsearchs({
116 'table' => 'cust_main',
117 'hashref' => { 'custnum' => $custnum },
118 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
119 }) or die "unknown custnum $custnum";
120 $title = emt("Account Report: [_1]", $cust_main->name);
127 'last_login' => 'Last login',
128 'last_logout' => 'Last logout',