bug 2787 : Fix Global Due date
[srvgit] / circ / view_holdsqueue.pl
index 739dbe0..e8e47a6 100755 (executable)
@@ -65,7 +65,7 @@ if ( $run_report ) {
 my $branches = GetBranches;
 my $branch   = C4::Context->userenv->{"branchname"};
 my @branchloop;
-foreach my $thisbranch ( keys %$branches ) {
+foreach my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches ) {
     my $selected = 1 if $thisbranch eq $branch;
     my %row = (
         value      => $thisbranch,
@@ -101,7 +101,7 @@ sub GetHoldsQueueItems {
                   LEFT JOIN items USING (itemnumber)
                 /;
     if ($branchlimit) {
-           $query .=" WHERE holdingbranch = ?";
+           $query .=" WHERE tmp_holdsqueue.holdingbranch = ?";
         push @bind_params, $branchlimit;
     }
     $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate";