- # FIXME: move this to a pm
- my $dbh = C4::Context->dbh;
- my $sth2 = $dbh->prepare("SELECT * FROM reserves WHERE borrowernumber=? AND itemnumber=? AND found='W'");
- $sth2->execute($itemLoopIter->{ReservedForBorrowernumber}, $itemNum);
- while (my $wait_hashref = $sth2->fetchrow_hashref) {
- $itemLoopIter->{waitingdate} = format_date($wait_hashref->{waitingdate});
- }
- $itemLoopIter->{imageurl} = getitemtypeimagelocation( 'opac', $itemTypes->{ $itemInfo->{itype} }{imageurl} );