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