1 <% include('/elements/header.html', 'Credit report' ) %>
3 <FORM ACTION="cust_credit.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
8 <% include( '/elements/tr-select-otaker.html',
9 'label' => 'Credits by employee: ',
10 'otakers' => \@otakers,
14 <% include( '/elements/tr-select-agent.html',
15 'curr_value' => scalar( $cgi->param('agentnum') ),
16 'label' => 'for agent: ',
20 <% include( '/elements/tr-input-beginning_ending.html' ) %>
22 <% include( '/elements/tr-input-lessthan_greaterthan.html',
31 <INPUT TYPE="submit" VALUE="Get Report">
35 <% include('/elements/footer.html') %>
40 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
42 my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit")
44 $sth->execute or die $sth->errstr;
45 my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};