Lines 318-323
See CanItemBeReserved() for possible return values.
Link Here
|
318 |
sub CanBookBeReserved{ |
318 |
sub CanBookBeReserved{ |
319 |
my ($borrowernumber, $biblionumber, $pickup_branchcode, $params) = @_; |
319 |
my ($borrowernumber, $biblionumber, $pickup_branchcode, $params) = @_; |
320 |
|
320 |
|
|
|
321 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
322 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
323 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
324 |
return { status =>'itemAlreadyOnLoan' }; |
325 |
} |
326 |
|
321 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
327 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
322 |
#get items linked via host records |
328 |
#get items linked via host records |
323 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
329 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
Lines 386-391
sub CanItemBeReserved {
Link Here
|
386 |
return { status =>'itemAlreadyOnHold' } |
392 |
return { status =>'itemAlreadyOnHold' } |
387 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
393 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
388 |
|
394 |
|
|
|
395 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
396 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
397 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
398 |
return { status =>'itemAlreadyOnLoan' }; |
399 |
} |
400 |
|
389 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
401 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
390 |
|
402 |
|
391 |
my $querycount = q{ |
403 |
my $querycount = q{ |
392 |
- |
|
|