X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FReserves.pm;h=87e23251a02248fc5f66f8a1e0c9ca9ada6e24a1;hb=ddbedbfc2f17bff016736afb5beae39a768a298a;hp=2dd2688fcdc454dc75bd2a2d2539aa5547fc9d32;hpb=3f35705ddcc3eff0df658faf12320a6e8671b668;p=koha_fer diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 2dd2688fcd..87e23251a0 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -2,7 +2,7 @@ package C4::Reserves; # Copyright 2000-2002 Katipo Communications # 2006 SAN Ouest Provence -# 2007 BibLibre Paul POULAIN +# 2007-2010 BibLibre Paul POULAIN # # This file is part of Koha. # @@ -804,6 +804,12 @@ 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 $iteminfo=C4::Items::GetItem($itemnumber); + my $branch=C4::Circulation::_GetCircControlBranch($iteminfo,$borrowerinfo); + my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'}); + next if ($branchitemrule->{'holdallowed'} == 0); + next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $borrowerinfo->{'branchcode'})); $priority = $res->{'priority'}; $highest = $res; }