X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-invoice.html;h=3728d348de63628bc7bf22f0a1af047377b3d950;hb=e803d5f00368e951f7a4b82d5d390b53c4a6c827;hp=03625b659d7f99aabd35f2a8984cb6a5f77b2c41;hpb=ca2f12276eb88b2e71762c76974ae564f008b8c1;p=freeside.git diff --git a/httemplate/elements/tr-select-invoice.html b/httemplate/elements/tr-select-invoice.html index 03625b659..3728d348d 100644 --- a/httemplate/elements/tr-select-invoice.html +++ b/httemplate/elements/tr-select-invoice.html @@ -1,3 +1,15 @@ +<%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 + ) + + <% mt('Open invoices') |h %> @@ -6,7 +18,6 @@ ID = "<% $opt{prefix} %>invoice" NAME = "<% $opt{prefix} %>invoice" onChange = "<% $opt{prefix} %>invoice_select_changed(this)" - <% $opt{disabled} %> > % foreach my $record (@records) { @@ -22,4 +33,11 @@ my %opt = @_; +my @records = qsearch( { + 'select' => '*', + 'table' => 'cust_bill', + 'hashref' => { 'custnum' => $opt{custnum} }, + 'order_by' => 'ORDER BY _date', +}); +