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=05f21c0977a82d14a83bb6f4a220937c2f991f22;hb=HEAD;hpb=3a8fa4f27ef08792e3d653cee167979a411f89d1 diff --git a/httemplate/search/report_cust_credit_source_bill_pkg.html b/httemplate/search/report_cust_credit_source_bill_pkg.html index 05f21c097..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, @@ -44,15 +44,6 @@ &> --> - -
@@ -67,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;