@@ -, +, @@ check AllowHoldsOnPatronsPossessions --- C4/Reserves.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/C4/Reserves.pm +++ a/C4/Reserves.pm @@ -283,6 +283,12 @@ sub CanBookBeReserved{ } } + # Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) + if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') + && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblionumber ) ) { + return { status =>'itemAlreadyOnLoan' }; + } + # Check if borrower has reached the maximum number of holds allowed my $maxreserves = C4::Context->preference('maxreserves'); if ($maxreserves && $holds->count >= $maxreserves) { @@ -368,6 +374,12 @@ sub CanItemBeReserved { } } + # Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) + if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') + && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { + return { status =>'itemAlreadyOnLoan' }; + } + # Check if borrower has reached the maximum number of holds allowed my $maxreserves = C4::Context->preference('maxreserves'); if ($maxreserves && $holds->count >= $maxreserves) { --