first part of ACL and re-skinning work and some other small stuff
[freeside.git] / httemplate / search / report_cust_credit.html
1 <%= include('/elements/header.html', 'Credit report' ) %>
2
3 <FORM ACTION="cust_credit.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
5
6 <TABLE>
7   <TR>
8     <TD ALIGN="right">Credits by employee: </TD>
9
10 <%
11   my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
12     or die dbh->errstr;
13   $sth->execute or die $sth->errstr;
14   my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};
15 %>
16
17     <TD><SELECT NAME="otaker">
18           <OPTION VALUE="">all</OPTION>
19           <% foreach my $otaker ( @otakers ) { %>
20             <OPTION VALUE="<%= $otaker %>"><%= $otaker %></OPTION>
21           <% } %>
22         </SELECT>
23     </TD>
24   </TR>
25   <%= include( '/elements/tr-select-agent.html',
26                  $cgi->param('agentnum'),
27                  'label' => 'for agent: ',
28              )
29   %>
30   <%= include( '/elements/tr-input-beginning_ending.html' ) %>
31 </TABLE>
32
33 <BR>
34 <INPUT TYPE="submit" VALUE="Get Report">
35
36 </FORM>
37
38 <%= include('/elements/footer.html') %>