$item_onhold_count++ if $reservestatus eq 'Waiting';
$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
- # can place hold on item ?
- if ( !$item->{itemlost} ) {
- if ( !$item->{wthdrawn} ){
- if ( $item->{damaged} ){
- if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){
- # can place a hold on a damaged item if AllowHoldsOnDamagedItems is true
- if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){
- # item is either for loan or has notforloan < 0
- $can_place_holds = 1;
- }
- }
- } elsif ( !$item->{notforloan} || $item->{notforloan} < 0 ) {
- # item is not damaged and item is either for loan or has notforloan < 0
- $can_place_holds = 1;
- }
- }
- }
+ # can place a hold on a item if
+ # not lost nor withdrawn
+ # not damaged unless AllowHoldsOnDamagedItems is true
+ # item is either for loan or on order (notforloan < 0)
+ $can_place_holds = 1
+ if (
+ !$item->{itemlost}
+ && !$item->{wthdrawn}
+ && ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') )
+ && ( !$item->{notforloan} || $item->{notforloan} < 0 )
+ );
$other_count++;