4 my $conf = new FS::Conf;
5 my($custnum, $amount, $reason);
6 if ( $cgi->param('error') ) {
7 #$cust_credit = new FS::cust_credit ( {
8 # map { $_, scalar($cgi->param($_)) } fields('cust_credit')
10 $custnum = $cgi->param('custnum');
11 $amount = $cgi->param('amount');
12 #$refund = $cgi->param('refund');
13 $reason = $cgi->param('reason');
15 my($query) = $cgi->keywords;
24 my $otaker = getotaker;
28 print header("Post Credit", '');
29 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
31 if $cgi->param('error');
32 print <<END, small_custview($custnum, $conf->config('countrydefault'));
33 <FORM ACTION="${p1}process/cust_credit.cgi" METHOD=POST>
34 <INPUT TYPE="hidden" NAME="crednum" VALUE="">
35 <INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">
36 <INPUT TYPE="hidden" NAME="paybatch" VALUE="">
37 <INPUT TYPE="hidden" NAME="_date" VALUE="$_date">
38 <INPUT TYPE="hidden" NAME="credited" VALUE="">
39 <INPUT TYPE="hidden" NAME="otaker" VALUE="$otaker">
42 print '<BR><BR>Credit'. ntable("#cccccc", 2).
43 '<TR><TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff">'.
44 time2str("%D",$_date). '</TD></TR>';
46 print qq!<TR><TD ALIGN="right">Amount</TD><TD BGCOLOR="#ffffff">\$<INPUT TYPE="text" NAME="amount" VALUE="$amount" SIZE=8 MAXLENGTH=8></TD></TR>!;
48 #print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!;
50 print qq!<TR><TD ALIGN="right">Reason</TD><TD BGCOLOR="#ffffff"><INPUT TYPE="text" NAME="reason" VALUE="$reason"></TD></TR>!;
52 print qq!<TR><TD ALIGN="right">Auto-apply<BR>to invoices</TD><TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED>yes<OPTION>no</SELECT></TD>!;
57 <INPUT TYPE="submit" VALUE="Post credit">