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