X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_credit.html;h=c37b578b494e1e9905726cb26e490c27c3339990;hb=103dfde149eec5034696d073253255f508a1be78;hp=dbab66ae53471bb3c193631e7726c4a3855bc7ec;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/httemplate/search/report_cust_credit.html b/httemplate/search/report_cust_credit.html index dbab66ae5..c37b578b4 100644 --- a/httemplate/search/report_cust_credit.html +++ b/httemplate/search/report_cust_credit.html @@ -8,7 +8,7 @@ <& /elements/tr-select-user.html, 'label' => emt('Credits by employee: '), - 'access_user' => \%access_user, + 'access_user' => $access_user, &> <& /elements/tr-select-agent.html, @@ -24,6 +24,22 @@ 'field' => 'amount', &> + <& /elements/tr-select-reason.html, + 'label' => emt('Reason').':', + 'field' => 'reasonnum', + 'reason_class' => 'R', + 'cgi' => $cgi, + 'hide_addnew' => 1, + 'pre_options' => [ 0 => emt('(any reason)') ], + &> + + <& /elements/tr-checkbox.html, + 'label' => emt('Show Voided Credits').':', + 'field' => 'show_voided_credits', + 'value' => '1', + &> + +
@@ -38,17 +54,11 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit") - or die dbh->errstr; -$sth->execute or die $sth->errstr; -my @usernum = map $_->[0], @{$sth->fetchall_arrayref}; -my %access_user = - map { $_ => qsearchs('access_user',{'usernum'=>$_})->username } - @usernum; +my $access_user = $FS::CurrentUser::CurrentUser->access_users_hashref('table' => 'cust_credit'); my $unapplied = $cgi->param('unapplied') ? 1 : 0; -my $title = $cgi->param('unapplied') ? +my $title = $cgi->param('unapplied') ? 'Unapplied credit report' : 'Credit report';