From 0f1727db376ffc9ac5504c16dfd9010a0c6b5417 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 8664801cf1..13c142c411 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 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 @@ -437,9 +437,9 @@ sub CanItemBeReserved { } } - if ($branchcode_to) { + if ($pickup_branchcode) { my $destination = Koha::Libraries->find({ - branchcode => $branchcode_to, + branchcode => $pickup_branchcode, }); unless ($destination) { return 'libraryNotFound'; -- 2.11.0