Lines 456-461
sub CanBookBeReserved{
Link Here
|
456 |
cannotReserveFromOtherBranches, if syspref 'canreservefromotherbranches' is OK. |
456 |
cannotReserveFromOtherBranches, if syspref 'canreservefromotherbranches' is OK. |
457 |
tooManyReserves, if the borrower has exceeded his maximum reserve amount. |
457 |
tooManyReserves, if the borrower has exceeded his maximum reserve amount. |
458 |
notReservable, if holds on this item are not allowed |
458 |
notReservable, if holds on this item are not allowed |
|
|
459 |
expired, if patron is expired and expired patrons are not allowed to place holds |
459 |
|
460 |
|
460 |
=cut |
461 |
=cut |
461 |
|
462 |
|
Lines 470-476
sub CanItemBeReserved{
Link Here
|
470 |
# item->{itype} will come for biblioitems if necessery |
471 |
# item->{itype} will come for biblioitems if necessery |
471 |
my $item = GetItem($itemnumber); |
472 |
my $item = GetItem($itemnumber); |
472 |
my $biblioData = C4::Biblio::GetBiblioData( $item->{biblionumber} ); |
473 |
my $biblioData = C4::Biblio::GetBiblioData( $item->{biblionumber} ); |
473 |
my $borrower = C4::Members::GetMember('borrowernumber'=>$borrowernumber); |
474 |
my $borrower = C4::Members::GetMemberDetails($borrowernumber); |
|
|
475 |
|
476 |
if ($borrower->{BlockExpiredPatronOpacActions} && $borrower->{is_expired}) { |
477 |
return 'expired'; |
478 |
} |
474 |
|
479 |
|
475 |
# If an item is damaged and we don't allow holds on damaged items, we can stop right here |
480 |
# If an item is damaged and we don't allow holds on damaged items, we can stop right here |
476 |
return 'damaged' if ( $item->{damaged} && !C4::Context->preference('AllowHoldsOnDamagedItems') ); |
481 |
return 'damaged' if ( $item->{damaged} && !C4::Context->preference('AllowHoldsOnDamagedItems') ); |
477 |
- |
|
|