From b5ca5025d4b11626c0e3abd507d8a51174dcd067 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Feb 2019 15:28:10 -0300 Subject: [PATCH] Bug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior Caused by commit 7d10549ae8632e6640d3a99014268a2a1e46b3c4 Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls At this point $order is a Koha::Acquisition::Order object, not a hashref anymore. Test plan: Create an order, receive items Enable OPACAcquisitionDetails At the detail page of the bibliographic record you should see "X items are on order." at the bottom of the items list --- opac/opac-detail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 51fa3af040..d8ab516814 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -661,7 +661,7 @@ if ( C4::Context->preference('OPACAcquisitionDetails' ) ) { if ( $basket->effective_create_items eq 'ordering' ) { @itemnumbers_on_order = $order->items->get_column('itemnumber'); } - $total_quantity += $order->{quantity}; + $total_quantity += $order->quantity; } $template->{VARS}->{acquisition_details} = { total_quantity => $total_quantity, -- 2.11.0