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