Bug 7639: add option to forgive overdue fines when declaring items lost
[koha.git] / catalogue / detail.pl
index a5b32c6..72258fd 100755 (executable)
@@ -41,6 +41,7 @@ use C4::XSLT;
 use C4::Images;
 use Koha::DateUtils;
 use C4::HTML5Media;
+use C4::CourseReserves qw(GetItemCourseReservesInfo);
 
 # use Smart::Comments;
 
@@ -269,6 +270,10 @@ foreach my $item (@items) {
        $materials_flag = 1;
     }
 
+    if ( C4::Context->preference('UseCourseReserves') ) {
+        $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
+    }
+
     if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
     and C4::Context->preference('SeparateHoldings')) {
         if ($itembranchcode and $itembranchcode eq $currentbranch) {
@@ -355,6 +360,7 @@ $template->param(
     subscriptions       => \@subs,
     subscriptionsnumber => $subscriptionsnumber,
     subscriptiontitle   => $dat->{title},
+    searchid            => $query->param('searchid'),
 );
 
 # $debug and $template->param(debug_display => 1);