blob: 3728d348de63628bc7bf22f0a1af047377b3d950 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<%doc>
Example:
include( '/elements/tr-select-invoice.html',
#opt - most get used in /elements/tr-amount-fee
'custnum' => 4, # customer number,
'prefix' => 'pre', # prefix to fields and row ID's
)
</%doc>
<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)"
>
<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 = @_;
my @records = qsearch( {
'select' => '*',
'table' => 'cust_bill',
'hashref' => { 'custnum' => $opt{custnum} },
'order_by' => 'ORDER BY _date',
});
</%init>
|