Sort dropdowns for libraries by name instead of branchcode in several staff-side...
[koha.git] / circ / selectbranchprinter.pl
index 17a89ef..f7173a1 100755 (executable)
@@ -67,7 +67,7 @@ my $oldprinter = $printer;
 my $branchcount  = 0;
 my $printercount = 0;
 my @branchloop;
-foreach my $br ( sort keys %$branches ) {
+for my $br (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
     next unless $br =~ /\S/; # next unless $br is not blank.
 
     $branchcount++;