torrus virtual ports, RT#10574
[freeside.git] / httemplate / elements / tr-select-cust_location.html
index 78252ba..5802f4e 100644 (file)
@@ -154,14 +154,20 @@ Example:
   <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service&nbsp;location' %></<%$th%>>
   <TD COLSPAN=7>
     <SELECT NAME="locationnum" onChange="locationnum_changed(this);">
+% if ( !$prospect_main ) {
       <OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
+% }
 % if ( $opt{'is_optional'} ) {
     <OPTION VALUE="-2" <% $locationnum == -2 ? 'SELECTED' : ''%>><% $opt{'optional_label'} || '(not required)' |h %>
 % }
 %     my @locations = $cust_main ? $cust_main->cust_location : ();
+%     @locations = qsearch('cust_location', 
+%                          { 'prospectnum' => $prospect_main->prospectnum } ) 
+%          if $prospect_main;
 %     push @locations, $cust_location
 %       if !$cust_main && $cust_location && $cust_location->locationnum>0;
 %     foreach my $loc ( sort $location_sort @locations ) {
+%       next if $loc->disabled;
         <OPTION VALUE="<% $loc->locationnum %>"
                 <% $locationnum == $loc->locationnum ? 'SELECTED' : '' %>
         ><% $loc->line |h %>