X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_pkg_discount.html;h=31774c384c697e79ae1b79bfdceb6c84655327e0;hb=636dd1f25af52d35efe7a323a5765ff5adeadf83;hp=7ebd44f7536fa31d6af3fb3a3e40fc53b188d958;hpb=942c8b05b17b119a3dad84d7035c76b481dc5b99;p=freeside.git diff --git a/httemplate/search/report_cust_pkg_discount.html b/httemplate/search/report_cust_pkg_discount.html index 7ebd44f75..31774c384 100644 --- a/httemplate/search/report_cust_pkg_discount.html +++ b/httemplate/search/report_cust_pkg_discount.html @@ -16,9 +16,9 @@ - <% include( '/elements/tr-select-otaker.html', - 'label' => 'Discounts by employee: ', - 'otakers' => \@otakers, + <% include( '/elements/tr-select-user.html', + 'label' => 'Discounts by employee: ', + 'access_user' => \%access_user, ) %> @@ -42,9 +42,12 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_pkg_discount") +my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_pkg_discount") 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;