use C4::Auth;
use C4::Reserves;
use C4::Biblio;
+use C4::Items;
use C4::Koha;
use C4::Circulation;
use C4::Dates qw/format_date/;
}
# FIXME: move this to a pm
- my $sth2 = $dbh->prepare("SELECT * FROM reserves WHERE borrowernumber=? AND itemnumber=? AND found='W' AND cancellationdate IS NULL");
+ my $sth2 = $dbh->prepare("SELECT * FROM reserves WHERE borrowernumber=? AND itemnumber=? AND found='W'");
$sth2->execute($item->{ReservedForBorrowernumber},$item->{itemnumber});
while (my $wait_hashref = $sth2->fetchrow_hashref) {
$item->{waitingdate} = format_date($wait_hashref->{waitingdate});
my @values;
my %label_of;
-foreach my $branchcode ( keys %{$branches} ) {
+foreach my $branchcode (sort keys %{$branches} ) {
push @values, $branchcode;
$label_of{$branchcode} = $branches->{$branchcode}->{branchname};
}