1 <SELECT <% $opt{'multiple'} ? 'MULTIPLE' : 'SIZE=1' %>
2 NAME = "<% $opt{'element_name'} || $opt{'field'} || 'pbxsvc' %>"
3 <% $opt{'element_etc'} %>
6 % unless ( $opt{'multiple'} || $opt{'disable_empty'} ) {
7 <OPTION VALUE=""><% $opt{'empty_label'} || '' %>
10 % foreach my $svcnum (
11 % sort { $svc_pbx{$a} cmp $svc_pbx{$b} }
14 % my $svc_pbx = $svc_pbx{$svcnum};
15 % my $selected = ($svcnum == $pbxsvc) ? ' SELECTED' : '';
17 <OPTION VALUE="<% $svcnum %>" <% $selected %>><% $svc_pbx{$svcnum} %>
24 # false laziness w/select-svc_acct-domain.html
28 my $pbxsvc = $opt{'curr_value'};
29 my $part_svc = $opt{'part_svc'}
30 || qsearchs('part_svc', { 'svcpart' => $opt{'svcpart'} });
31 my $svcpart = $part_svc ? $part_svc->svcpart : '';
34 my $cust_pkg = $opt{'cust_pkg'};
35 $cust_pkg ||= qsearchs('cust_pkg', { 'pkgnum' => $opt{'pkgnum'} })
38 my $pkgnum = $cust_pkg ? $cust_pkg->pkgnum : '';
43 my $svc_pbx = qsearchs('svc_pbx', { 'svcnum' => $pbxsvc } );
45 $svc_pbx{$svc_pbx->svcnum} = $svc_pbx;
47 warn "unknown svc_pbx.svcnum for svc_acct.pbxsvc: $pbxsvc";
53 FS::svc_Common->pbx_select_hash( 'svcpart' => $svcpart,