%
my($crednum, $amount, $invnum);
if ( $cgi->param('error') ) {
#$cust_credit_bill = new FS::cust_credit_bill ( {
# map { $_, scalar($cgi->param($_)) } fields('cust_credit_bill')
#} );
$crednum = $cgi->param('crednum');
$amount = $cgi->param('amount');
#$refund = $cgi->param('refund');
$invnum = $cgi->param('invnum');
} else {
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
$crednum = $1;
$amount = '';
#$refund = 'yes';
$invnum = '';
}
my $otaker = getotaker;
my $p1 = popurl(1);
%><%= header("Apply Credit", '') %>
<% if ( $cgi->param('error') ) { %>
Error: <%= $cgi->param('error') %>
<% } %>