1 <% include('/elements/header.html', 'Credit report' ) %>
3 <FORM ACTION="cust_credit.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
8 <TD ALIGN="right">Credits by employee: </TD>
11 <SELECT NAME="otaker">
12 <OPTION VALUE="">all</OPTION>
13 % foreach my $otaker ( @otakers ) {
14 <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION>
20 <% include( '/elements/tr-select-agent.html',
21 'curr_value' => scalar( $cgi->param('agentnum') ),
22 'label' => 'for agent: ',
26 <% include( '/elements/tr-input-beginning_ending.html' ) %>
28 <% include( '/elements/tr-input-lessthan_greaterthan.html',
37 <INPUT TYPE="submit" VALUE="Get Report">
41 <% include('/elements/footer.html') %>
46 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
48 my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
50 $sth->execute or die $sth->errstr;
51 my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};