+<& /elements/init_overlib.html &>
+
+<TABLE class="fsinnerbox">
+
+ <& /elements/tr-amount_fee.html,
+ 'amount' => $amount,
+ 'process-pkgpart' =>
+ scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)),
+ 'process-display' => scalar($conf->config('manual_process-display')),
+ 'process-skip_first' => $conf->exists('manual_process-skip_first'),
+ 'num_payments' => scalar($cust_main->cust_pay),
+ 'surcharge_percentage' =>
+ ( $payby eq 'CARD'
+ ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum))
+ : 0
+ ),
+ &>
+
+% if ( $conf->exists('part_pkg-term_discounts') ) {
+ <& /elements/tr-select-discount_term.html,
+ 'custnum' => $custnum,
+ 'amount_id' => 'amount',
+ &>
+% }
+
+% my $disallow_no_auto_apply = 0;
+% if ( $conf->exists("batch-enable")
+% || grep $payby eq $_, $conf->config('batch-enable_payby')
+% ) {
+%
+% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) {
+% $disallow_no_auto_apply = 1;
+
+ <INPUT TYPE="hidden" NAME="batch" VALUE="1">
+
+% } else {
+
+ <TR>
+ <TH ALIGN="right"> <% mt('Add to current batch') |h %></TH>
+ <TD>
+ <INPUT TYPE="checkbox" NAME="batch" VALUE="1" ID="batch_checkbox" ONCHANGE="change_batch_checkbox()">
+ </TD>
+ </TR>
+
+% }
+% }
+
+% unless ($disallow_no_auto_apply) {
+% # false laziness with edit/cust_pay.cgi
+
+<TR ID="apply_box_row">
+ <TH ALIGN="right"><% mt('Auto-apply to invoices') |h %></TH>
+ <TD>
+ <SELECT NAME="apply" ID="apply_box">
+ <OPTION VALUE="yes" SELECTED><% mt('yes') |h %></OPTION>
+ <OPTION VALUE=""><% mt('not now') |h %></OPTION>
+ <OPTION VALUE="never"><% mt('never') |h %></OPTION>
+ </SELECT>
+ </TD>
+</TR>