Will things ever be the same again?
[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 %  my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
11 %    or die dbh->errstr;
12 %  $sth->execute or die $sth->errstr;
13 %  my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};
14 %
15
16
17     <TD><SELECT NAME="otaker">
18           <OPTION VALUE="">all</OPTION>
19 % foreach my $otaker ( @otakers ) { 
20
21             <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION>
22 % } 
23
24         </SELECT>
25     </TD>
26   </TR>
27   <% include( '/elements/tr-select-agent.html',
28                  $cgi->param('agentnum'),
29                  'label' => 'for agent: ',
30              )
31   %>
32   <% include( '/elements/tr-input-beginning_ending.html' ) %>
33 </TABLE>
34
35 <BR>
36 <INPUT TYPE="submit" VALUE="Get Report">
37
38 </FORM>
39
40 <% include('/elements/footer.html') %>