From 2dbffe2bbf543e15665aa6a03f7aeffb8f28ebd3 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 19 Dec 2017 15:51:42 -0300
Subject: [PATCH] Bug 19798: Fix print transfer slip

... and maybe other bugs as well
What happens here is that $itemnumber is no longer set when barcode is
passed.

Test plan:
1. Check in available/not on hold item at a non owning library.
2. Click print slip
3. Item's info must be displayed on the slip
---
 circ/returns.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/circ/returns.pl b/circ/returns.pl
index c69310bc13..0924da5d2f 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -263,6 +263,7 @@ if ($barcode) {
     my $item = Koha::Items->find({ barcode => $barcode });
 
     if ( $item ) {
+        $itemnumber = $item->itemnumber;
         # Check if we should display a checkin message, based on the the item
         # type of the checked in item
         my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype );
-- 
2.11.0