summaryrefslogtreecommitdiff
path: root/httemplate/search/report_cust_bill_pkg_discount.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/report_cust_bill_pkg_discount.html')
-rw-r--r--httemplate/search/report_cust_bill_pkg_discount.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/httemplate/search/report_cust_bill_pkg_discount.html b/httemplate/search/report_cust_bill_pkg_discount.html
index f1879d4..f9ab901 100644
--- a/httemplate/search/report_cust_bill_pkg_discount.html
+++ b/httemplate/search/report_cust_bill_pkg_discount.html
@@ -5,9 +5,9 @@
<TABLE>
- <% include( '/elements/tr-select-otaker.html',
- 'label' => 'Discounts by employee: ',
- 'otakers' => \@otakers,
+ <% include( '/elements/tr-select-user.html',
+ 'label' => 'Discounts by employee: ',
+ 'access_user' => \%access_user,
)
%>
@@ -39,9 +39,12 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
-my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_pkg_discount")
+my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_pkg_discount")
or die dbh->errstr;
$sth->execute or die $sth->errstr;
-my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref};
+my @usernum = map $_->[0], @{$sth->fetchall_arrayref};
+my %access_user =
+ map { $_ => qsearchs('access_user',{'usernum'=>$_})->username }
+ @usernum;
</%init>