From 8794348ccbb156ddd1ec53702b5afebea1747976 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 May 2016 19:57:16 +0100 Subject: [PATCH] Bug 16570: Do not tell all checked-in items are part of a rotating collection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When an item is checked-in a message will tell you it's part of a rotating collection, even if it's not true. Test plan: Make sure the message appears only when needed. Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- circ/returns.pl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 380454367c..c91d78463b 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -642,16 +642,18 @@ $template->param( $itemnumber = GetItemnumberFromBarcode( $barcode ); if ( $itemnumber ) { - my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); - $holdingBranch //= ''; - $collectionBranch //= $returnbranch; - if ( ! ( $holdingBranch eq $collectionBranch ) ) { - $template->param( - collectionItemNeedsTransferred => 1, - collectionBranchName => GetBranchName($collectionBranch), - collectionBranch => $collectionBranch, - itemnumber => $itemnumber, - ); + my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); + if ( $holdingBranch and $collectionBranch ) { + $holdingBranch //= ''; + $collectionBranch //= $returnbranch; + if ( ! ( $holdingBranch eq $collectionBranch ) ) { + $template->param( + collectionItemNeedsTransferred => 1, + collectionBranchName => GetBranchName($collectionBranch), + collectionBranch => $collectionBranch, + itemnumber => $itemnumber, + ); + } } } -- 2.39.5