http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc;h=5bb76ec85f312148f1118f51e5640c74434bde81;hb=refs/heads/16.05.x I found the item.itemnotforloan variable, but opac-course-details.tt has used this codes. 54 [% IF ( item.itemnotforloan ) %] 55 [% SET itemavailable = 0 %] 56 [% IF ( item.notforloanvalueopac ) %] 57 <span class="item-status notforloan">[% item.notforloanvalueopac %] [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]</span> 58 [% ELSE %] 59 <span class="item-status notforloan">Not for loan [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]</span> 60 [% END %] 61 [% ELSIF ( item.notforloan_per_itemtype ) %] 62 [% SET itemavailable = 0 %] 63 <span class="item-status notforloan">Not for loan [% IF ( item.restrictedopac ) %]<span class="restricted">([% item.restrictedopac %])</span>[% END %]</span> 64 [% END %] opac-course-details.tt line 76 76 <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td> 77 <td><span title="[% cr.issue.date_due %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td> 78 <td>[% IF ( cr.public_note ) %] Dump opac-course-details.pl codes. http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=opac/opac-course-details.pl;h=3afa8a921a3e94ab61de75052da015d85868fd35;hb=refs/heads/16.05.x 47 my $course_reserves = GetCourseReserves( course_id => $course_id, include_items => 1, include_count => 1 ); $course_reserves has no item.itemnotforloan variables, but has item.notforloan variables. course_reserves -------------------- $VAR1 = [ { 'itemnumber' => '19349', 'course_item' => { 'itemnumber' => '19349', 'ccode' => undef, 'location' => undef, 'ci_id' => '18', 'course_reserves' => [ { 'timestamp' => '2017-02-22 17:16:50', 'ci_id' => '18', 'staff_note' => '', 'course_id' => '7', 'cr_id' => '18', 'public_note' => '' } ], 'holdingbranch' => undef, 'timestamp' => '2017-02-23 11:11:33', 'itype' => 'BOOKC', 'enabled' => 'yes' }, 'ci_id' => '18', 'item' => { 'withdrawn' => '0', 'coded_location_qualifier' => undef, 'marc' => '00501nam a2200157Ia 4500003000600000005001700006008004000023040000800063100006800071245009700139250000800236260004900244700001800293942001700311999001500328AOGST20161028172127.0141108s1986 ch e 000 chi d aaog1 a賀西納 Harold Vinson Synan 著/魏玉琴 譯c(Vinson Synan)10a靈恩運動 c賀西納 (Vinson Synan)著 ; 魏玉琴譯b美國聖潔及五旬節運動史 a初 b教會更新研究發展中心c1986a台北1 aSynanbVinson 2AOGSTcBOOKC c6589d6589', 'url' => undef, 'isbn' => undef, 'copyrightdate' => '1986', 'itemnumber' => '19349', 'ccode' => undef, 'serial' => undef, 'cn_suffix' => undef, 'barcode' => 'B1010102217', 'cn_item' => undef, 'uri' => undef, 'marcxml' => "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <record xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd\" xmlns=\"http://www.loc.gov/MARC21/slim\"> <leader>00501nam a2200157Ia 4500</leader> <controlfield tag=\"003\">AOGST</controlfield> <controlfield tag=\"005\">20161028172127.0</controlfield> <controlfield tag=\"008\">141108s1986 ch e 000 chi d</controlfield> <datafield tag=\"040\" ind1=\" \" ind2=\" \"> <subfield code=\"a\">aog</subfield> </datafield> <datafield tag=\"100\" ind1=\"1\" ind2=\" \"> <subfield code=\"a\">\x{8cc0}\x{897f}\x{7d0d} Harold Vinson Synan \x{8457}/\x{9b4f}\x{7389}\x{7434} \x{8b6f}</subfield> <subfield code=\"c\">(Vinson Synan)</subfield> </datafield> <datafield tag=\"245\" ind1=\"1\" ind2=\"0\"> <subfield code=\"a\">\x{9748}\x{6069}\x{904b}\x{52d5} </subfield> <subfield code=\"c\">\x{8cc0}\x{897f}\x{7d0d} (Vinson Synan)\x{8457} ; \x{9b4f}\x{7389}\x{7434}\x{8b6f}</subfield> <subfield code=\"b\">\x{7f8e}\x{570b}\x{8056}\x{6f54}\x{53ca}\x{4e94}\x{65ec}\x{7bc0}\x{904b}\x{52d5}\x{53f2}</subfield> </datafield> <datafield tag=\"250\" ind1=\" \" ind2=\" \"> <subfield code=\"a\">\x{521d}</subfield> </datafield> <datafield tag=\"260\" ind1=\" \" ind2=\" \"> <subfield code=\"b\">\x{6559}\x{6703}\x{66f4}\x{65b0}\x{7814}\x{7a76}\x{767c}\x{5c55}\x{4e2d}\x{5fc3}</subfield> <subfield code=\"c\">1986</subfield> <subfield code=\"a\">\x{53f0}\x{5317}</subfield> </datafield> <datafield tag=\"700\" ind1=\"1\" ind2=\" \"> <subfield code=\"a\">Synan</subfield> <subfield code=\"b\">Vinson</subfield> </datafield> <datafield tag=\"942\" ind1=\" \" ind2=\" \"> <subfield code=\"2\">AOGST</subfield> <subfield code=\"c\">BOOKC</subfield> </datafield> <datafield tag=\"999\" ind1=\" \" ind2=\" \"> <subfield code=\"c\">6589</subfield> <subfield code=\"d\">6589</subfield> </datafield> </record> ", 'materials' => undef, 'datelastseen' => '2017-02-21', 'cn_class' => undef, 'title' => "\x{9748}\x{6069}\x{904b}\x{52d5} ", 'pages' => undef, 'withdrawn_on' => undef, 'number' => undef, 'itemtype' => 'BOOKC', 'totalissues' => undef, 'author' => "\x{8cc0}\x{897f}\x{7d0d} Harold Vinson Synan \x{8457}/\x{9b4f}\x{7389}\x{7434} \x{8b6f}", 'size' => undef, 'replacementprice' => undef, 'seriestitle' => undef, 'booksellerid' => undef, 'timestamp' => '2016-10-28 17:21:27', 'new_status' => undef, 'editionstatement' => "\x{521d}", 'stocknumber' => undef, 'publishercode' => "\x{6559}\x{6703}\x{66f4}\x{65b0}\x{7814}\x{7a76}\x{767c}\x{5c55}\x{4e2d}\x{5fc3}", 'collectionvolume' => undef, 'datecreated' => '2014-11-08', 'reserves' => undef, 'editionresponsibility' => undef, 'itemnotes_nonpublic' => undef, 'enumchron' => undef, 'dateaccessioned' => '2016-10-28', 'notes' => undef, 'permanent_location' => undef, 'volumedate' => undef, 'itype' => 'CRC', 'onloan' => undef, 'illus' => undef, 'ean' => undef, 'biblioitemnumber' => '6589', 'restricted' => undef, 'agerestriction' => undef, 'itemlost_on' => undef, 'notforloan' => '1', 'replacementpricedate' => '2016-10-28', 'itemnotes' => undef, 'itemcallnumber' => '231.21 8349', 'location' => undef, 'stack' => undef, 'itemlost' => '0', 'collectionissn' => undef, 'price' => undef, 'abstract' => undef, 'collectiontitle' => undef, 'publicationyear' => undef, 'issues' => '1', 'place' => "\x{53f0}\x{5317}", 'homebranch' => 'AOGST', 'issn' => undef, 'cn_source' => 'AOGST', 'more_subfields_xml' => undef, 'holdingbranch' => 'AOGST', 'renewals' => undef, 'biblionumber' => '6589', 'damaged' => '0', 'unititle' => undef, 'cn_sort' => '', 'lccn' => undef, 'volume' => undef, 'frameworkcode' => 'M21', 'datelastborrowed' => '2017-02-06', 'volumedesc' => undef, 'copynumber' => 'c.2', 'paidfor' => undef }, 'issue' => undef, 'public_note' => '', 'reserves_count' => '1', 'timestamp' => '2017-02-22 17:16:50', 'staff_note' => '', 'course_id' => '7', 'cr_id' => '18' },
The original comment is a little too much information, so I'm obsoleting it. The problem *** This bug has been marked as a duplicate of bug 11979 ***