</SCRIPT>
<TR>
- <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service location' %></<%$th%>>
+ <<%$th%> ALIGN="right"><% $opt{'label'} || emt('Service location') %></<%$th%>>
<TD COLSPAN=7>
- <SELECT NAME="locationnum" onChange="locationnum_changed(this);">
+ <SELECT NAME = "locationnum"
+ ID = "locationnum"
+ onChange = "locationnum_changed(this);"
+ >
% if ( !$prospect_main && !$opt{'disable_empty'} ) {
<OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
% }
@cust_location = sort $location_sort grep !$_->disabled, @cust_location;
-if ( ( $prospect_main || $opt{'disable_empty'} ) && !$opt{'is_optional'} ) {
- $cust_location = $cust_location[0];
-}
+$cust_location = $cust_location[0]
+ if ( $prospect_main || $opt{'disable_empty'} )
+ && !$opt{'is_optional'}
+ && @cust_location;
my $disabled =
( $locationnum < 0