Bug 7057: CheckReserves uses GetMemberDetails unnecessarily

Replaces call to GetMemberDetails with a call to GetMember.  Much more efficient,
and since only branchcode is used, no required data is lost.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Ian Walls 2011-10-18 17:56:18 -04:00 committed by Chris Cormack
parent 885f016394
commit a1e3975067

View file

@ -826,7 +826,7 @@ sub CheckReserves {
} else {
# See if this item is more important than what we've got so far
if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
my $borrowerinfo=C4::Members::GetMemberDetails($res->{'borrowernumber'});
my $borrowerinfo=C4::Members::GetMember(borrowernumber => $res->{'borrowernumber'});
my $iteminfo=C4::Items::GetItem($itemnumber);
my $branch=C4::Circulation::_GetCircControlBranch($iteminfo,$borrowerinfo);
my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});