change invoice terms for one-time charges (& bill them immediately), RT#5891
[freeside.git] / httemplate / elements / select-terms.html
1 <SELECT NAME = "invoice_terms"
2         ID   = "invoice_terms"
3         <% $opt{'disabled'} ? 'DISABLED' : ''%>
4 >
5   <OPTION VALUE=""><% $empty_label %>
6 % foreach my $term ( @terms ) {
7     <OPTION VALUE="<% $term %>" <% $curr_value eq $term ? ' SELECTED' : '' %>><% $term %>
8 % }
9 </SELECT>
10 <%init>
11
12 my %opt = @_;
13 my $curr_value = $opt{'curr_value'};
14 my $conf = new FS::Conf;
15
16 my $empty_label =
17   $opt{'empty_label'}
18   || 'Default ('.
19        ($conf->config('invoice_default_terms') || 'Payable upon receipt').
20      ')';
21
22 my @terms = ( 'Payable upon receipt',
23               ( map "Net $_", 0, 10, 15, 20, 30, 45, 60 ),
24             );
25
26 </%init>