<%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; }