diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-01-10 22:46:31 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-01-10 22:46:31 -0800 |
| commit | 77daf007ef522ae71041d9b094643cf868d8ecce (patch) | |
| tree | 3849fd8c41fc7fcd08567fab7ec90ae533808b0a /httemplate/elements/tr-select-invoice.html | |
| parent | dd43be3233e0411109342c691a47d1b6d6747015 (diff) | |
| parent | 5136b6e7f17e6d86911f7feb520dd5b4248532bb (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/tr-select-invoice.html')
| -rw-r--r-- | httemplate/elements/tr-select-invoice.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-invoice.html b/httemplate/elements/tr-select-invoice.html new file mode 100644 index 000000000..3728d348d --- /dev/null +++ b/httemplate/elements/tr-select-invoice.html @@ -0,0 +1,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> |
