From 7112fb2b56fd4b05b14f9515b5eb45a245a85e32 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Mon, 9 Jul 2018 11:12:57 +1200 Subject: [PATCH] Bug 19532: Fixed display of recall buttons on opac-course-details.pl Recall button now displayed on items in opac-course-details.pl which are issued to another user. No internal server error being thrown on courses with issued course reserves. Sponsored-By: Toi Ohomai Institute of Technology, New Zealand --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- opac/opac-course-details.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index ff185c2..77be5dd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -75,7 +75,7 @@ [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %] [% cr.item.itemcallnumber | html %] [% cr.item.copynumber | html %] - [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %] + [% INCLUDE 'item-status.inc' item=cr.course_item issue=cr.issue %] [% cr.issue.date_due | $KohaDates as_due_date => 1 | html %] [% IF ( cr.public_note ) %] [% cr.public_note | html %] diff --git a/opac/opac-course-details.pl b/opac/opac-course-details.pl index bc61196..57d15a1 100755 --- a/opac/opac-course-details.pl +++ b/opac/opac-course-details.pl @@ -47,7 +47,7 @@ my $course = GetCourse($course_id); my $course_reserves = GetCourseReserves( course_id => $course_id, include_items => 1, include_count => 1 ); foreach my $cr (@$course_reserves) { - if ($cr->{'issue'}->{date_due} && $cr->{'isue'}->{borrowernumber} && $borrowernumber != $cr->{'issue'}->{borrowernumber} && C4::Context->preference('UseRecalls')) { + if ($cr->{'issue'}->{date_due} && $cr->{'issue'}->{borrowernumber} && $borrowernumber != $cr->{'issue'}->{borrowernumber} && C4::Context->preference('UseRecalls')) { $cr->{'course_item'}->{avail_for_recall} = 1; } else { $cr->{'course_item'}->{avail_for_recall} = 0; -- 2.1.4