X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_credit.html;h=dbab66ae53471bb3c193631e7726c4a3855bc7ec;hb=9d9e19a3f5dee791886aa440bd8c3f65cf4a41ae;hp=9932097639478c76768e860c5b8e6d43080b8487;hpb=590603ecaea3184f64530755a76626be8205da49;p=freeside.git diff --git a/httemplate/search/report_cust_credit.html b/httemplate/search/report_cust_credit.html index 993209763..dbab66ae5 100644 --- a/httemplate/search/report_cust_credit.html +++ b/httemplate/search/report_cust_credit.html @@ -1,53 +1,54 @@ -<% include('/elements/header.html', 'Credit report' ) %> +<& /elements/header.html, mt($title) &>
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> 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; + +my $unapplied = $cgi->param('unapplied') ? 1 : 0; + +my $title = $cgi->param('unapplied') ? + 'Unapplied credit report' : 'Credit report'; %init>