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

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 1441-1447 sub IsAvailableForItemLevelRequest { Link Here
1441
    if (C4::Context->preference('AllowOnShelfHolds')) {
1441
    if (C4::Context->preference('AllowOnShelfHolds')) {
1442
        return $available_per_item;
1442
        return $available_per_item;
1443
    } else {
1443
    } else {
1444
        return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); 
1444
        return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W" or $item->{notforloan} < 0));
1445
    }
1445
    }
1446
}
1446
}
1447
1447
(-)a/opac/opac-detail.pl (-6 / +5 lines)
Lines 386-397 if ($session->param('busc')) { Link Here
386
}
386
}
387
}
387
}
388
388
389
390
391
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
389
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
392
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
390
my $count_items_issued = CountItemsIssued( $biblionumber ); # If AllowOnShelfHolds is disabled, at least one item must be either issued or have a negative not for loan status
393
394
395
391
396
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
392
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
397
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") );
393
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") );
Lines 529-534 for my $itm (@items) { Link Here
529
		 && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
525
		 && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
530
         && ($itm->{'itemnumber'} ) );
526
         && ($itm->{'itemnumber'} ) );
531
527
528
    $count_items_issued++ if ( $itm->{'itemnotforloan'} < 0 ); ## Not for loan items with negative values should count as issued items for the purpose of holdability
529
532
    if ( defined $itm->{'publictype'} ) {
530
    if ( defined $itm->{'publictype'} ) {
533
        # I can't actually find any case in which this is defined. --amoore 2008-12-09
531
        # I can't actually find any case in which this is defined. --amoore 2008-12-09
534
        $itm->{ $itm->{'publictype'} } = 1;
532
        $itm->{ $itm->{'publictype'} } = 1;
Lines 571-576 for my $itm (@items) { Link Here
571
     }
569
     }
572
}
570
}
573
571
572
$template->param( 'ItemsIssued' => $count_items_issued );
573
574
## get notes and subjects from MARC record
574
## get notes and subjects from MARC record
575
my $dbh              = C4::Context->dbh;
575
my $dbh              = C4::Context->dbh;
576
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
576
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
577
- 

Return to bug 6918