invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / elements / tr-select-invoice_template.html
1 <% include('tr-td-label.html', @_) %>
2
3   <TD <% $style %>>
4
5     <SELECT NAME = "<% $opt{'field'} || 'templatename' %>"
6             ID   = "<% $opt{'id'} %>"
7     >
8
9 %     foreach my $templatename ( '', @templatenames ) {
10             
11         <OPTION VALUE="<% $templatename %>"
12                 <% $templatename eq $curr_value ? 'SELECTED' : '' %>
13         ><% $templatename || '(Default)' %>
14
15 %     }
16
17     </SELECT>
18
19   </TD>
20
21 </TR>
22
23 <%init>
24
25 my %opt = @_;
26
27 my $onchange = $opt{'onchange'}
28                  ? 'onChange="'. $opt{'onchange'}. '(this)"'
29                  : '';
30
31 my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
32
33 my $curr_value = $opt{'curr_value'} || $opt{'value'};
34
35 my $conf = new FS::Conf;
36
37 my @templatenames = $conf->invoice_templatenames;
38
39 </%init>