Bug 19388: FIX display item status if item is checked out
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 29 Sep 2017 14:49:30 +0000 (11:49 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Oct 2017 13:59:14 +0000 (10:59 -0300)
commitea9255c00439fbedccab14a4a50b47fcb1ba05ac
treea832ecc580bb18aa7809682808355a0ca60deb83
parent10b5e1ee049605ae6a0614214a7dab76e20e0ca5
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>
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc