X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_bill_pkg_discount.html;h=f9ab901b5a93888bf5ee83f957bf226e339a7663;hb=d8299144d2175f1695adafe29e9549bd9b158e2f;hp=f1879d4a90e5b2346a4f06062d7400fbb6be44c1;hpb=942c8b05b17b119a3dad84d7035c76b481dc5b99;p=freeside.git diff --git a/httemplate/search/report_cust_bill_pkg_discount.html b/httemplate/search/report_cust_bill_pkg_discount.html index f1879d4a9..f9ab901b5 100644 --- a/httemplate/search/report_cust_bill_pkg_discount.html +++ b/httemplate/search/report_cust_bill_pkg_discount.html @@ -5,9 +5,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, ) %> @@ -39,9 +39,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;