From a55f7ec0ec1270157a5e4487a4c37efaecbd00d4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 15 Aug 2018 13:51:10 -0400 Subject: [PATCH] Bug 7534: Disambiguate branchcode parameter, make it match between subroutines --- C4/Reserves.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index f16b06c..81fca13 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -273,7 +273,7 @@ See CanItemBeReserved() for possible return values. =cut sub CanBookBeReserved{ - my ($borrowernumber, $biblionumber, $branchcode) = @_; + my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_; my $items = GetItemnumbersForBiblio($biblionumber); #get items linked via host records @@ -284,7 +284,7 @@ sub CanBookBeReserved{ my $canReserve; foreach my $item (@$items) { - $canReserve = CanItemBeReserved( $borrowernumber, $item, $branchcode ); + $canReserve = CanItemBeReserved( $borrowernumber, $item, $pickup_branchcode ); return 'OK' if $canReserve->{status} eq 'OK'; } return $canReserve; @@ -307,7 +307,7 @@ sub CanBookBeReserved{ =cut sub CanItemBeReserved { - my ( $borrowernumber, $itemnumber, $branchcode_to ) = @_; + my ( $borrowernumber, $itemnumber, $pickup_branchcode ) = @_; my $dbh = C4::Context->dbh; my $ruleitemtype; # itemtype of the matching issuing rule @@ -460,9 +460,9 @@ sub CanItemBeReserved { } } - if ($branchcode_to) { + if ($pickup_branchcode) { my $destination = Koha::Libraries->find({ - branchcode => $branchcode_to, + branchcode => $pickup_branchcode, }); unless ($destination) { return { status => 'libraryNotFound' }; -- 2.1.4