From a2b805a0df53be89884a64d890dfea4a5f13ac9c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 27 Mar 2019 11:36:47 +0000 Subject: [PATCH] Bug 14576: (follow-up) Using item objects, not hashrefs Signed-off-by: Liz Rea Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- C4/Items.pm | 2 +- C4/Reserves.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 69dc4d1f2b..0f5648c215 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -549,7 +549,7 @@ sub ModItemTransfer { my $item = Koha::Items->find( $itemnumber ); # Remove the 'shelving cart' location status if it is being used. - CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ); + CartToShelf( $itemnumber ) if ( $item->location eq 'CART' && $item->permanent_location ne 'CART' ); $dbh->do("UPDATE branchtransfers SET datearrived = NOW(), comments = ? WHERE itemnumber = ? AND datearrived IS NULL", undef, "Canceled, new transfer from $frombranch to $tobranch created", $itemnumber); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index f016fd024a..5fc68f1359 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1030,7 +1030,7 @@ sub ModReserveStatus { $sth_set->execute( $newstatus, $itemnumber ); my $item = Koha::Items->find($itemnumber); - if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) && $newstatus ) { + if ( ( $item->location eq 'CART' && $item->permanent_location ne 'CART' ) && $newstatus ) { CartToShelf( $itemnumber ); } } @@ -1083,7 +1083,7 @@ sub ModReserveAffect { _FixPriority( { biblionumber => $biblionumber } ); my $item = Koha::Items->find($itemnumber); - if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) ) { + if ( ( $item->location eq 'CART' && $item->permanent_location ne 'CART' ) ) { CartToShelf( $itemnumber ); } -- 2.39.5