Bug 31463: Add order status to opac-detail.pl
authorNick Clemens <nick@bywatersolutions.com>
Thu, 25 Aug 2022 13:12:19 +0000 (13:12 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 3 Oct 2022 11:40:57 +0000 (08:40 -0300)
commit5590d09fe7b400711ada4c9abdda37b34589a8ee
tree66c818bac33302fcd48af05d5e4947076aaec595
parent389b9dfaf43e889612990401ab83cc1f75972333
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message

JK: Remove unused @itemnumbers_on_order variable
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
opac/opac-detail.pl