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

(-)a/opac/opac-ISBDdetail.pl (-1 / +2 lines)
Lines 176-187 my $res = GetISBDView({ Link Here
176
});
176
});
177
177
178
my $items = $biblio->items;
178
my $items = $biblio->items;
179
my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems');
179
while ( my $item = $items->next ) {
180
while ( my $item = $items->next ) {
180
    $norequests = 0
181
    $norequests = 0
181
      if $norequests
182
      if $norequests
182
        && !$item->withdrawn
183
        && !$item->withdrawn
183
        && !$item->itemlost
184
        && !$item->itemlost
184
        && ( !$item->damaged || C4::Context->preference('AllowHoldsOnDamagedItems') )
185
        && ( !$item->damaged || $allow_damaged_holds )
185
        && ($item->notforloan < 0 || not $item->notforloan )
186
        && ($item->notforloan < 0 || not $item->notforloan )
186
        && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan
187
        && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan
187
        && $item->itemnumber;
188
        && $item->itemnumber;
(-)a/opac/opac-MARCdetail.pl (-1 / +2 lines)
Lines 146-158 $template->param( Link Here
146
my $norequests = 1;
146
my $norequests = 1;
147
my $allow_onshelf_holds;
147
my $allow_onshelf_holds;
148
my $items = $biblio->items;
148
my $items = $biblio->items;
149
my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems');
149
150
150
while ( my $item = $items->next ) {
151
while ( my $item = $items->next ) {
151
    $norequests = 0
152
    $norequests = 0
152
      if $norequests
153
      if $norequests
153
        && !$item->withdrawn
154
        && !$item->withdrawn
154
        && !$item->itemlost
155
        && !$item->itemlost
155
        && ( !$item->damaged || C4::Context->preference('AllowHoldsOnDamagedItems') )
156
        && ( !$item->damaged || $allow_damaged_holds )
156
        && ($item->notforloan < 0 || not $item->notforloan )
157
        && ($item->notforloan < 0 || not $item->notforloan )
157
        && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan
158
        && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan
158
        && $item->itemnumber;
159
        && $item->itemnumber;
(-)a/opac/opac-detail.pl (-2 / +2 lines)
Lines 701-706 if ( not $viewallitems and @items > $max_items_to_display ) { Link Here
701
        items_count => scalar( @items ),
701
        items_count => scalar( @items ),
702
    );
702
    );
703
} else {
703
} else {
704
  my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems');
704
  for my $itm (@items) {
705
  for my $itm (@items) {
705
    my $item = Koha::Items->find( $itm->{itemnumber} );
706
    my $item = Koha::Items->find( $itm->{itemnumber} );
706
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
707
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
Lines 709-715 if ( not $viewallitems and @items > $max_items_to_display ) { Link Here
709
      if $norequests
710
      if $norequests
710
        && !$itm->{'withdrawn'}
711
        && !$itm->{'withdrawn'}
711
        && !$itm->{'itemlost'}
712
        && !$itm->{'itemlost'}
712
        && ( !$itm->{'damaged'} || C4::Context->preference('AllowHoldsOnDamagedItems') )
713
        && ( !$itm->{'damaged'} || $allow_damaged_holds )
713
        && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'})
714
        && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'})
714
        && !$itemtypes->{$itm->{'itype'}}->{notforloan}
715
        && !$itemtypes->{$itm->{'itype'}}->{notforloan}
715
        && $itm->{'itemnumber'};
716
        && $itm->{'itemnumber'};
716
- 

Return to bug 28667