allow all-agent reporting again
[freeside.git] / httemplate / search / report_svc_acct.html
1 <% include('/elements/header.html', 'Account Report' ) %>
2
3 <FORM ACTION="svc_acct.cgi" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="advanced">
5
6   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8     <TR>
9       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
10     </TR>
11     <% include( '/elements/tr-select-agent.html',
12                    'curr_value'    => scalar($cgi->param('agentnum')),
13                    'disable_empty' => 0,
14                )
15     %>
16
17     <SCRIPT type="text/javascript">
18       function toggle(what) {
19         label = document.getElementById (what + '_label');
20         field = document.getElementById ( what + '_invert');
21         if (field.value == 1) {
22           field.value = 0;
23         } else {
24           field.value = 1;
25         }
26         if (field.value == 1) {
27           label.firstChild.nodeValue = 'Did not ' + label.firstChild.nodeValue;
28         }else{
29           text = label.firstChild.nodeValue;
30           label.firstChild.nodeValue = text.replace(/Did not /, '');
31         }
32       }
33     </SCRIPT>
34 %   foreach my $field (qw( last_login last_logout )) {
35 %     my $invert = $field."_invert";
36
37       <TR>
38         <TD>
39           <TABLE>
40             <TR>
41               <TD ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
42                 <% $label{$field} %>
43               </TD>
44               <TD>
45                 <INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
46                 <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;">Invert</A>
47               </TD>
48             </TR>
49           </TABLE>
50         </TD>
51         <TD>
52           <TABLE>
53             <% include( '/elements/tr-input-beginning_ending.html',
54                           prefix   => $field,
55                           layout   => 'horiz',
56                       )
57             %>
58           </TABLE>
59         </TD>
60       </TR>
61
62 %   }
63     
64     <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %> 
65
66     <TR>
67       <TH BGCOLOR="#e8e8e8" COLSPAN=2>&nbsp;</TH>
68     </TR>
69  
70     <TR>
71       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
72     </TR>
73     <% include( '/elements/tr-select-cust-fields.html' ) %>
74                        
75   </TABLE>
76
77 <BR>
78 <INPUT TYPE="submit" VALUE="Get Report">
79
80 </FORM>
81
82 <% include('/elements/footer.html') %>
83 <%init>
84
85 die "access denied"
86   unless $FS::CurrentUser::CurrentUser->access_right('List packages');
87
88 </%init>
89 <%once>
90
91 my %label = (
92   'last_login'  => 'Last login',
93   'last_logout' => 'Last logout',
94 );
95
96 </%once>