% if ( scalar(@{ $opt{'cust_payby'} }) == 0 ) { % } else { <% $opt{'label'} || 'Payment via' %> <% include( '/elements/select-cust_payby.html', 'curr_value' => $custpaybynum, %opt ) %> % } <%init> my %opt = @_; my $custpaybynum = $opt{'curr_value'} || $opt{'value'}; $opt{'cust_payby'} ||= [ qsearch( 'cust_payby', { custnum => $opt{custnum}, disabled => '', } ) ];