X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_credit_void.html;h=16a9e42d66861f2a7d3cc02785701ed03a23d587;hp=e96708090e50e1c91a160890738f14319bf6ea17;hb=fc263806f5e475559a0c4cfdb70a5f1cefe0ffa3;hpb=251d07aa41b6830a0a2f2a51c14fa94586d843c2 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';