diff options
Diffstat (limited to 'httemplate/search/report_cust_credit.html')
| -rw-r--r-- | httemplate/search/report_cust_credit.html | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/httemplate/search/report_cust_credit.html b/httemplate/search/report_cust_credit.html index 9c719b787..c7e552238 100644 --- a/httemplate/search/report_cust_credit.html +++ b/httemplate/search/report_cust_credit.html @@ -5,9 +5,9 @@ <TABLE> - <% include( '/elements/tr-select-otaker.html', - 'label' => 'Credits by employee: ', - 'otakers' => \@otakers, + <% include( '/elements/tr-select-user.html', + 'label' => 'Credits by employee: ', + 'access_user' => \%access_user, ) %> @@ -40,9 +40,13 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_credit") +my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit") or die dbh->errstr; $sth->execute or die $sth->errstr; -my @otakers = map { $_->[0] } @{$sth->fetchall_arrayref}; +my @usernum = map $_->[0], @{$sth->fetchall_arrayref}; +my %access_user = + map { $_ => qsearchs('access_user',{'usernum'=>$_})->username } + @usernum; + </%init> |
