invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / elements / select-otaker.html
1 <SELECT NAME="otaker">
2
3 % unless ( $opt{'multiple'} || $opt{'disable_empty'} ) {
4   <OPTION VALUE=""><% mt('all') |h %></OPTION>
5 % }
6
7 % foreach my $otaker ( @{ $opt{'otakers'} } ) { 
8     <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION>
9 % } 
10
11 </SELECT>
12
13 <%init>
14
15 my %opt = @_;
16
17 unless ( $opt{'otakers'} ) {
18
19   my $sth = dbh->prepare("SELECT username FROM access_user".
20                        " WHERE disabled = '' or disabled IS NULL")
21     or die dbh->errstr;
22   $sth->execute or die $sth->errstr;
23   $opt{'otakers'} = [ map { $_->[0] } @{$sth->fetchall_arrayref} ];
24
25 }
26
27 </%init>