1 <SELECT NAME = "invoice_terms"
3 <% $opt{'disabled'} ? 'DISABLED' : ''%>
5 # #false laziness w/select-table.html
6 % while ( @pre_options ) {
7 % my $pre_opt = shift(@pre_options);
8 % my $pre_label = shift(@pre_options);
9 % my $selected = # ( ref($value) && $value->{$pre_opt} ) ||
10 % ( $curr_value eq $pre_opt );
11 <OPTION VALUE="<% $pre_opt %>"
12 <% $selected ? 'SELECTED' : '' %>
16 <OPTION VALUE="<% $empty_value %>"><% $empty_label %>
17 % foreach my $term ( @terms ) {
18 <OPTION VALUE="<% $term %>" <% $curr_value eq $term ? ' SELECTED' : '' %>><% $term %>
24 my $curr_value = $opt{'curr_value'};
25 my $conf = new FS::Conf;
29 || emt('Default').' ('.
30 ( $conf->config('invoice_default_terms', $opt{'agentnum'})
31 || emt('Payable upon receipt')
35 my $empty_value = $opt{'empty_value'} || '';
37 my @terms = ( emt('Payable upon receipt'),
39 0, 3, 5, 9, 10, 14, 15, 18, 20, 21, 25, 30, 45, 60, 90 ),
42 my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : ();