X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-invoice.html;h=d35813fc5aaf3f35f26ffb8f1ce39ef8ab5530ea;hb=a495aa8d41e752490fff8d61aa190601c51a2cb1;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..d35813fc5 100644 --- a/httemplate/elements/tr-select-invoice.html +++ b/httemplate/elements/tr-select-invoice.html @@ -1,25 +1,51 @@ +<%doc> + +Example: + + include( '/elements/tr-select-invoice.html', + + #opt - most get used in /elements/tr-amount-fee + 'cust_main' => $cust_main, # cust_main, + 'status' => 'open' # type of invoices to show. Possible values are: + # open - shows only open invoices + # void - shows only voided invoices + # all - shows all invoices, this is default if no status is set. + 'prefix' => 'pre', # prefix to fields and row ID's + ) + + <% mt('Open invoices') |h %> - + '; + % } - + + + <% $hidden %> + <%init> my %opt = @_; +my $status = $opt{'status'} ? $opt{'status'} : 'all'; +my $hidden; + +my @invoices; +if ($status eq "all") { @invoices = $opt{'cust_main'}->cust_bill; } +elsif ($status eq "open") { @invoices = $opt{'cust_main'}->open_cust_bill; } +elsif ($status eq "void") { @invoices = $opt{'cust_main'}->cust_bill_void; }