Lines 311-316
See CanItemBeReserved() for possible return values.
Link Here
|
311 |
sub CanBookBeReserved{ |
311 |
sub CanBookBeReserved{ |
312 |
my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_; |
312 |
my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_; |
313 |
|
313 |
|
|
|
314 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
315 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
316 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
317 |
return { status =>'itemAlreadyOnLoan' }; |
318 |
} |
319 |
|
314 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
320 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
315 |
#get items linked via host records |
321 |
#get items linked via host records |
316 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
322 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
Lines 375-380
sub CanItemBeReserved {
Link Here
|
375 |
return { status =>'itemAlreadyOnHold' } |
381 |
return { status =>'itemAlreadyOnHold' } |
376 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
382 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
377 |
|
383 |
|
|
|
384 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
385 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
386 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
387 |
return { status =>'itemAlreadyOnLoan' }; |
388 |
} |
389 |
|
378 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
390 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
379 |
|
391 |
|
380 |
my $querycount = q{ |
392 |
my $querycount = q{ |
381 |
- |
|
|