cdr/kannel.pm: change row parse format, RT10991
[freeside.git] / httemplate / elements / tr-select-cust_location.html
index d44b1c4..49478f2 100644 (file)
@@ -145,12 +145,16 @@ Example:
 <TR>
   <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service&nbsp;location' %></<%$th%>>
   <TD COLSPAN=7>
-    <SELECT NAME="locationnum" onChange="locationnum_changed(this);">
+    <SELECT NAME     = "locationnum"
+            ID       = "locationnum"
+            onChange = "locationnum_changed(this);"
+    >
       <OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
 %     my @locations = $cust_main ? $cust_main->cust_location : ();
 %     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 %>
@@ -224,10 +228,10 @@ if ( $locationnum && $locationnum != -1 ) {
 }
 
 my $location_sort = sub {
-     $a->country  cmp $b->country
-  or $a->city     cmp $b->city
-  or $a->address1 cmp $b->address1
-  or $a->address2 cmp $b->address2
+        $a->country   cmp $b->country
+  or lc($a->city)     cmp lc($b->city)
+  or lc($a->address1) cmp lc($b->address1)
+  or lc($a->address2) cmp lc($b->address2)
 };
 
 my $disabled = ( $locationnum == -1 || ($editable && $locationnum) )