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