5 include( '/elements/tr-select-invoice.html',
7 #opt - most get used in /elements/tr-amount-fee
8 'custnum' => 4, # customer number,
9 'prefix' => 'pre', # prefix to fields and row ID's
14 <TR ID="invoice_row" STYLE="display:none;">
15 <TH ALIGN="right"><% mt('Open invoices') |h %></TH>
18 ID = "<% $opt{prefix} %>invoice"
19 NAME = "<% $opt{prefix} %>invoice"
20 onChange = "<% $opt{prefix} %>invoice_select_changed(this)"
22 <OPTION VALUE="select">Select an invoice to pay</OPTION>
23 % foreach my $record (@records) {
24 % my $read_date = time2str("%b %o, %Y", $record->_date);
25 <OPTION VALUE="<% $record->charged %>"><% $record->invnum %> (<% $read_date %>) - <% $record->charged %></OPTION>
36 my @records = qsearch( {
38 'table' => 'cust_bill',
39 'hashref' => { 'custnum' => $opt{custnum} },
40 'order_by' => 'ORDER BY _date',