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 $item->{notforloan} < 0 or GetReserveStatus($itemnumber) eq "W" ));
1445
    }
1445
    }
1446
}
1446
}
1447
1447
(-)a/opac/opac-detail.pl (-6 / +5 lines)
Lines 387-398 if ($session->param('busc')) { Link Here
387
}
387
}
388
}
388
}
389
389
390
391
392
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
390
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
393
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
391
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
394
395
396
392
397
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
393
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
398
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") );
394
$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 589-594 if (scalar(@itemloop) >= 50 && !$viewallitems) { Link Here
589
    $template->param('lotsofitems' => 1);
587
    $template->param('lotsofitems' => 1);
590
}
588
}
591
589
590
$template->param( 'ItemsIssued' => $count_items_issued );
591
592
## get notes and subjects from MARC record
592
## get notes and subjects from MARC record
593
my $dbh              = C4::Context->dbh;
593
my $dbh              = C4::Context->dbh;
594
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
594
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
595
- 

Return to bug 6918