Bug 7831 : Sort budgets for selection in new order
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 27 Mar 2012 15:04:12 +0000 (16:04 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 12 Apr 2012 16:24:39 +0000 (18:24 +0200)
The select budget dropdown list should be presented in
an ordered fashion. To achieve this sort the budget array
by the visible text.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
acqui/neworderempty.pl

index d482554..7dc7cb5 100755 (executable)
@@ -264,6 +264,8 @@ foreach my $r (@{$budgets}) {
     };
 }
 
+@{$budget_loop} =
+  sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop};
 
 if ($close) {
     $budget_id      =  $data->{'budget_id'};