Lines 290-295
See CanItemBeReserved() for possible return values.
Link Here
|
290 |
sub CanBookBeReserved{ |
290 |
sub CanBookBeReserved{ |
291 |
my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_; |
291 |
my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_; |
292 |
|
292 |
|
|
|
293 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
294 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
295 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
296 |
return { status =>'itemAlreadyOnLoan' }; |
297 |
} |
298 |
|
293 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
299 |
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber"); |
294 |
#get items linked via host records |
300 |
#get items linked via host records |
295 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
301 |
my @hostitems = get_hostitemnumbers_of($biblionumber); |
Lines 354-359
sub CanItemBeReserved {
Link Here
|
354 |
return { status =>'itemAlreadyOnHold' } |
360 |
return { status =>'itemAlreadyOnHold' } |
355 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
361 |
if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count(); |
356 |
|
362 |
|
|
|
363 |
# Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) |
364 |
if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') |
365 |
&& C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { |
366 |
return { status =>'itemAlreadyOnLoan' }; |
367 |
} |
368 |
|
357 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
369 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
358 |
|
370 |
|
359 |
my $querycount = q{ |
371 |
my $querycount = q{ |
360 |
- |
|
|