summaryrefslogtreecommitdiff
path: root/httemplate/search/report_cust_credit_void.html
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-03-04 18:33:52 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-03-04 18:33:52 -0600
commit7c7d54475dcdb041af4b42b13d3d4084627a8e9f (patch)
tree8a9410d39428681828d24e5ac87e1f396e4ca3c4 /httemplate/search/report_cust_credit_void.html
parent8dfb2c715ff2de2553bcf3744a2b4d742314a2cb (diff)
RT#22952: Employee drop down list in reports shows employee users for all agents
Diffstat (limited to 'httemplate/search/report_cust_credit_void.html')
-rw-r--r--httemplate/search/report_cust_credit_void.html10
1 files changed, 2 insertions, 8 deletions
diff --git a/httemplate/search/report_cust_credit_void.html b/httemplate/search/report_cust_credit_void.html
index e96708090..16a9e42d6 100644
--- a/httemplate/search/report_cust_credit_void.html
+++ b/httemplate/search/report_cust_credit_void.html
@@ -7,7 +7,7 @@
<& /elements/tr-select-user.html,
'label' => emt('Credit voids by employee: '),
- 'access_user' => \%access_user,
+ 'access_user' => $access_user,
&>
<& /elements/tr-select-agent.html,
@@ -37,13 +37,7 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
-my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit_void")
- 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_credit_void');
my $title = 'Voided credit report';