X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-cust_location.html;h=1399240d9d0c907bbdb28b16295d4477e5b987a2;hb=ef9855e3023558132b4669319335782b5dd2ff6d;hp=b882c3d461892b673aff43f5413503faf08e73b7;hpb=25b48e1acbf6ad7ebd3e85b479ee6cd3a8ccd098;p=freeside.git diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html index b882c3d46..1399240d9 100644 --- a/httemplate/elements/tr-select-cust_location.html +++ b/httemplate/elements/tr-select-cust_location.html @@ -305,9 +305,10 @@ push @cust_location, $cust_location @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