X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_bill_pkg_discount.html;h=78c5e4f169324b3873e515d50be946c9d1db34ec;hb=ac07dfa491181046e8dd2881d6093da9e8d3616f;hp=77affd19ddb045dcc1fbb0e0dd37df9048ab28f6;hpb=e58318fb3653e96097c0c3af84369d3397619cc4;p=freeside.git diff --git a/httemplate/search/report_cust_bill_pkg_discount.html b/httemplate/search/report_cust_bill_pkg_discount.html index 77affd19d..78c5e4f16 100644 --- a/httemplate/search/report_cust_bill_pkg_discount.html +++ b/httemplate/search/report_cust_bill_pkg_discount.html @@ -13,7 +13,7 @@ <& /elements/tr-select-user.html, 'label' => 'Discounts by employee: ', - 'access_user' => \%access_user, + 'access_user' => $access_user, &> <& /elements/tr-select-agent.html, @@ -44,12 +44,6 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_pkg_discount") - or die dbh->errstr; -$sth->execute or die $sth->errstr; -my @usernum = map $_->[0], @{$sth->fetchall_arrayref}; -my %access_user = - map { $_ => qsearchs('access_user',{'usernum'=>$_})->username } - @usernum; +my $access_user = $FS::CurrentUser::CurrentUser->access_users_hashref('table' => 'cust_pkg_discount', 'disabled' => 1);