- <TR>
+ <TR ID="payment_amount_row" STYLE="display:none;">
<TH ALIGN="right"><% mt('Payment amount') |h %></TH>
<TD COLSPAN=7>
<TABLE><TR><TD BGCOLOR="#ffffff">
onKeyPress = "amount_changed(this)"
% }
>
- </TD><TD BGCOLOR="#cccccc">
+ </TD><TD BGCOLOR="<% length($fee) ? '#cccccc' : '#ffffff' %>">
% if ( $fee ) {
<INPUT TYPE="hidden" NAME="fee_pkgpart" VALUE="<% $fee_pkg->pkgpart %>">
<INPUT TYPE="hidden" NAME="fee" VALUE="<% $fee_display eq 'add' ? $fee : '' %>">
--- /dev/null
+
+ <TR ID="invoice_row" STYLE="display:none;">
+ <TH ALIGN="right"><% mt('Open invoices') |h %></TH>
+ <TD COLSPAN=7>
+ <SELECT
+ ID = "<% $opt{prefix} %>invoice"
+ NAME = "<% $opt{prefix} %>invoice"
+ onChange = "<% $opt{prefix} %>invoice_select_changed(this)"
+ <% $opt{disabled} %>
+ >
+ <OPTION VALUE="select">Select an invoice to pay</OPTION>
+% foreach my $record (@records) {
+% my $read_date = time2str("%b %o, %Y", $record->_date);
+ <OPTION VALUE="<% $record->charged %>"><% $record->invnum %> (<% $read_date %>) - <% $record->charged %></OPTION>
+% }
+
+ </SELECT>
+ </TD>
+ </TR>
+
+<%init>
+
+my %opt = @_;
+
+</%init>
<TABLE class="fsinnerbox">
- <& /elements/tr-amount_fee.html,
+ <& /elements/tr-select-payment_options.html,
+ 'custnum' => $cust_main->custnum,
'amount' => $amount,
'process-pkgpart' =>
scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)),