1 <% include('/elements/header.html', 'Package discount report' ) %>
3 <FORM ACTION="cust_pkg_discount.html" METHOD="GET">
9 <TD>Discount status</TD>
11 <SELECT NAME="status">
12 <OPTION VALUE="active">Active
13 <OPTION VALUE="expired">Expired
14 <OPTION VALUE="">(all)
19 <% include( '/elements/tr-select-user.html',
20 'label' => 'Discounts by employee: ',
21 'access_user' => \%access_user,
25 <% include( '/elements/tr-select-agent.html',
26 'curr_value' => scalar( $cgi->param('agentnum') ),
27 'label' => 'for agent: ',
35 <INPUT TYPE="submit" VALUE="Get Report">
39 <% include('/elements/footer.html') %>
43 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
45 my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_pkg_discount")
47 $sth->execute or die $sth->errstr;
48 my @usernum = map $_->[0], @{$sth->fetchall_arrayref};
50 map { $_ => qsearchs('access_user',{'usernum'=>$_})->username }