Bug 16570: Do not tell all checked-in items are part of a rotating collection

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 <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-05-24 19:57:16 +01:00 committed by Kyle M Hall
parent 30cf9ee277
commit 8794348ccb
1 changed files with 12 additions and 10 deletions

View File

@ -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,
);
}
}
}