X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_credit_source_bill_pkg.html;h=7bfacc4facbef2113e8387dbd615fae266bb4bdd;hp=b579b92cccbd439e36bb7afd9b4a938bec806377;hb=949a80c148a8bbeeeec54c5a0be5d73b292423a5;hpb=7b40e0e045368d350529d78208be0e6124f94b5a diff --git a/httemplate/search/report_cust_credit_source_bill_pkg.html b/httemplate/search/report_cust_credit_source_bill_pkg.html index b579b92cc..7bfacc4fa 100644 --- a/httemplate/search/report_cust_credit_source_bill_pkg.html +++ b/httemplate/search/report_cust_credit_source_bill_pkg.html @@ -7,7 +7,7 @@ <& /elements/tr-select-user.html, 'label' => emt('Employee: '), - 'access_user' => \%access_user, + 'access_user' => $access_user, &> <& /elements/tr-select-agent.html, @@ -58,14 +58,7 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -#false laziness w/report_cust_credit.html -my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit") - 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'); my $conf = new FS::Conf;