diff options
author | ivan <ivan> | 2010-08-15 07:00:21 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-08-15 07:00:21 +0000 |
commit | 55476aa0484f5ebada5f36e1407722d84609bd34 (patch) | |
tree | 56509008c166ace467f2ac2ef8688ac2afcfe6b9 /httemplate/search/report_cust_credit.html | |
parent | 80f722b82cb92fa49ee172230be3c61f72e56f41 (diff) |
additional by-otaker searches fixed for the brave new world of usernum, RT#9555
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> |