<& /elements/header-popup.html, mt('Enter Credit') &> <& /elements/error.html &>
<% ntable("#cccccc", 2) %> <% mt('Date') |h %> <% time2str($date_format, $_date) %> <% mt('Amount') |h %> $ <& /elements/tr-select-reason.html, 'field' => 'reasonnum', 'reason_class' => 'R', 'control_button' => "document.getElementById('confirm_credit_button')", 'cgi' => $cgi, &> <% mt('Additional info') |h %> % if ( $conf->exists('credits-auto-apply-disable') ) { % } else { <% mt('Auto-apply to invoices') |h %> % } % if ( $conf->exists('pkg-balances') ) { <& /elements/tr-select-cust_pkg-balances.html, 'custnum' => $custnum, 'cgi' => $cgi &> % } else { % }
<%init> my $conf = new FS::Conf; my $date_format = $conf->config('date_format') || '%m/%d/%Y'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Post credit'); my $custnum = $cgi->param('custnum'); my $amount = $cgi->param('amount'); my $_date = time; my $otaker = getotaker; my $p1 = popurl(1);