1 <% include('/elements/header.html', 'Discount report' ) %>
3 <FORM ACTION="cust_bill_pkg_discount.html" METHOD="GET">
8 <% include( '/elements/tr-select-user.html',
9 'label' => 'Discounts by employee: ',
10 'access_user' => \%access_user,
14 <% include( '/elements/tr-select-agent.html',
15 'curr_value' => scalar( $cgi->param('agentnum') ),
16 'label' => 'for agent: ',
21 <% include( '/elements/tr-input-beginning_ending.html' ) %>
23 <% include( '/elements/tr-input-lessthan_greaterthan.html',
32 <INPUT TYPE="submit" VALUE="Get Report">
36 <% include('/elements/footer.html') %>
40 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
42 my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_pkg_discount")
44 $sth->execute or die $sth->errstr;
45 my @usernum = map $_->[0], @{$sth->fetchall_arrayref};
47 map { $_ => qsearchs('access_user',{'usernum'=>$_})->username }