View | Details | Raw Unified | Return to bug 22806
Collapse All | Expand All

(-)a/C4/Reserves.pm (-1 / +12 lines)
Lines 274-279 See CanItemBeReserved() for possible return values. Link Here
274
sub CanBookBeReserved{
274
sub CanBookBeReserved{
275
    my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_;
275
    my ($borrowernumber, $biblionumber, $pickup_branchcode) = @_;
276
276
277
    # Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set)
278
    if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions')
279
        && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) {
280
        return { status =>'itemAlreadyOnLoan' };
281
    }
282
277
    my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber");
283
    my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber");
278
    #get items linked via host records
284
    #get items linked via host records
279
    my @hostitems = get_hostitemnumbers_of($biblionumber);
285
    my @hostitems = get_hostitemnumbers_of($biblionumber);
Lines 336-341 sub CanItemBeReserved { Link Here
336
    return { status =>'itemAlreadyOnHold' }
342
    return { status =>'itemAlreadyOnHold' }
337
      if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count();
343
      if Koha::Holds->search( { borrowernumber => $borrowernumber, itemnumber => $itemnumber } )->count();
338
344
345
    # Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set)
346
    if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions')
347
        && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) {
348
        return { status =>'itemAlreadyOnLoan' };
349
    }
350
339
    my $controlbranch = C4::Context->preference('ReservesControlBranch');
351
    my $controlbranch = C4::Context->preference('ReservesControlBranch');
340
352
341
    my $querycount = q{
353
    my $querycount = q{
342
- 

Return to bug 22806