Bug 19388: FIX display item status if item is checked out
In course reserves, if an item which was added to a course is checked out, it is not possible to show details for that course on OPAC. The error says: "Template process failed: undef error - The method onsite_checkout is not covered by tests! at /home/koha/src/C4/Templates.pm line 121." onsite_checkout is an attribute of Koha::Checkout, not Koha::Item Test plan: Create a course with 2 items that are checked out (standard and on-site) At the OPAC, add them to your cart and confirm the status of these 2 items is correct Confirm that on the detail page of the bib record as well as the detail of the course. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
10b5e1ee04
commit
ea9255c004
1 changed files with 7 additions and 3 deletions
|
@ -16,12 +16,16 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF item.isa('Koha::Item') %][% SET datedue = issue.date_due %]
|
||||
[% ELSE %][% SET datedue = item.datedue || issue.date_due %]
|
||||
[% IF item.isa('Koha::Item') %]
|
||||
[% SET datedue = issue.date_due %]
|
||||
[% SET onsite_checkout = issue.onsite_checkout %]
|
||||
[% ELSE %]
|
||||
[% SET datedue = item.datedue || issue.date_due %]
|
||||
[% SET onsite_checkout = item.onsite_checkout %]
|
||||
[% END %]
|
||||
[% IF datedue %]
|
||||
[% SET itemavailable = 0 %]
|
||||
[% IF item.onsite_checkout %]
|
||||
[% IF onsite_checkout %]
|
||||
[% IF ( OPACShowCheckoutName ) %]
|
||||
<span class="item-status checkedout">Currently in local use by [% item.firstname %] [% item.surname %] [% IF ( item.cardnumber ) %]([% item.cardnumber %])[% END %]</span>
|
||||
[% ELSE %]
|
||||
|
|
Loading…
Reference in a new issue