Bug 17698: Do not send pending_checkout_notes from all circ scripts
[koha.git] / circ / view_holdsqueue.pl
index bcacd50..f7dbbc2 100755 (executable)
@@ -30,7 +30,6 @@ use C4::Biblio;
 use C4::Items;
 use C4::HoldsQueue qw(GetHoldsQueueItems);
 use Koha::BiblioFrameworks;
-
 use Koha::ItemTypes;
 
 my $query = new CGI;
@@ -53,6 +52,9 @@ my $itemtypeslimit = $params->{'itemtypeslimit'};
 if ( $run_report ) {
     # XXX GetHoldsQueueItems() does not support $itemtypeslimit!
     my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit);
+    for my $item ( @$items ) {
+        $item->{patron} = Koha::Patrons->find( $item->{borrowernumber} );
+    }
     $template->param(
         branchlimit     => $branchlimit,
         total      => scalar @$items,