Bug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Feb 2019 18:28:10 +0000 (15:28 -0300)
committerroot <root@f1ebe1bec408>
Mon, 4 Mar 2019 18:20:54 +0000 (18:20 +0000)
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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
opac/opac-detail.pl

index 751f804..8e9aa59 100755 (executable)
@@ -662,7 +662,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,