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 <FONT CLASS="fsinnerbox-title"><% emt('Search options') %></FONT>
8 <TABLE CLASS="fsinnerbox">
10 % unless ( $custnum ) {
11 <& /elements/tr-select-agent.html,
12 'curr_value' => scalar( $cgi->param('agentnum') ),
16 % # just this customer's domains?
17 <& /elements/tr-select-domain.html,
18 'element_name' => 'domsvc',
19 'curr_value' => scalar( $cgi->param('domsvc') ),
24 <SCRIPT type="text/javascript">
25 function toggle(what) {
26 label = document.getElementById (what + '_label');
27 field = document.getElementById ( what + '_invert');
28 if (field.value == 1) {
33 if (field.value == 1) {
34 label.firstChild.nodeValue = 'Did not ' + label.firstChild.nodeValue;
36 text = label.firstChild.nodeValue;
37 label.firstChild.nodeValue = text.replace(/Did not /, '');
41 % foreach my $field (qw( last_login last_logout )) {
42 % my $invert = $field."_invert";
48 <TH ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
52 <INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
53 <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;"><% mt('Invert') |h %></A>
60 <& /elements/tr-input-beginning_ending.html,
70 <& /elements/tr-selectmultiple-part_pkg.html &>
72 <& /elements/tr-select-part_svc.html, svcdb=>'svc_acct' &>
74 % my $conf = new FS::Conf;
75 % if ( $conf->exists('svc_acct-tower_sector')
76 % and FS::tower_sector->count > 0 ) {
77 <& /elements/tr-select-tower_sector.html,
79 'label' => 'Tower/Sector',
87 <FONT CLASS="fsinnerbox-title"><% emt('Display options') %></FONT>
88 <TABLE CLASS="fsinnerbox">
90 % #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
92 <TH ALIGN="right"><% mt('Package fields') |h %></TH>
94 <SELECT NAME="cust_pkg_fields">
95 <OPTION VALUE=""><% mt('(none)') |h %>
96 <OPTION VALUE="setup,last_bill,bill,cancel"><% mt('Setup date | Last bill date | Next bill date | Cancel date') |h %>
101 <& /elements/tr-select-cust-fields.html &>
106 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
110 <& /elements/footer.html &>
114 unless $FS::CurrentUser::CurrentUser->access_right('Services: Accounts: Advanced search'); #?
116 my $title = mt('Account Report');
118 #false laziness w/report_cust_pkg.html
120 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
122 my $cust_main = qsearchs({
123 'table' => 'cust_main',
124 'hashref' => { 'custnum' => $custnum },
125 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
126 }) or die "unknown custnum $custnum";
127 $title = mt("Account Report: [_1]", $cust_main->name);
134 'last_login' => 'Last login',
135 'last_logout' => 'Last logout',