1 <& /elements/header-popup.html, mt('Enter Credit') &>
3 <& /elements/error.html &>
5 <FORM NAME="credit_popup" ACTION="<% $p1 %>process/cust_credit.cgi" METHOD=POST>
6 <INPUT TYPE="hidden" NAME="crednum" VALUE="">
7 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum |h %>">
8 <INPUT TYPE="hidden" NAME="paybatch" VALUE="">
9 <INPUT TYPE="hidden" NAME="credited" VALUE="">
11 <% ntable("#cccccc", 2) %>
15 % 'label' => emt('Date'),
17 % 'format' => $date_format. ' %r',
19 % if ( $FS::CurrentUser::CurrentUser->access_right('Backdate credit') ) {
21 <& /elements/tr-input-date-field.html, \%date_args &>
25 <& /elements/tr-fixed-date.html, \%date_args &>
30 <TD ALIGN="right"><% mt('Amount') |h %></TD>
31 <TD BGCOLOR="#ffffff"><% $money_char |h %><INPUT TYPE="text" NAME="amount" VALUE="<% $amount |h %>" SIZE=8 MAXLENGTH=9></TD>
34 <& /elements/tr-select-reason.html,
35 'field' => 'reasonnum',
36 'reason_class' => 'R',
37 'control_button' => 'confirm_credit_button',
42 <TD ALIGN="right"><% mt('Additional info') |h %></TD>
44 <INPUT TYPE="text" NAME="addlinfo" VALUE="<% $cgi->param('addlinfo') |h %>">
48 % if ( $conf->exists('credits-auto-apply-disable') ) {
49 <INPUT TYPE="HIDDEN" NAME="apply" VALUE="no">
52 <TD ALIGN="right"><% mt('Auto-apply to invoices') |h %></TD>
53 <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED><% mt('yes') |h %><OPTION><% mt('no') |h %></SELECT></TD>
57 % if ( $conf->exists('pkg-balances') ) {
58 <& /elements/tr-select-cust_pkg-balances.html,
59 'custnum' => $custnum,
63 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="">
70 <CENTER><INPUT TYPE="submit" ID="confirm_credit_button" VALUE="<% mt('Enter credit') |h %>" DISABLED></CENTER>
77 my $conf = new FS::Conf;
79 my $money_char = $conf->config('money_char') || '$';
80 my $date_format = $conf->config('date_format') || '%m/%d/%Y';
83 unless $FS::CurrentUser::CurrentUser->access_right('Post credit');
85 my $custnum = $cgi->param('custnum');
86 my $amount = $cgi->param('amount');