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

(-)a/C4/Circulation.pm (-4 / +4 lines)
Lines 2945-2951 sub CanBookBeRenewed { Link Here
2945
        }
2945
        }
2946
    }
2946
    }
2947
2947
2948
    if ( C4::Context->preference('AllowRenewalIfOtherItemsAvailable') && !Koha::Holds->search( { itemnumber => $itemnumber, found => undef } )->count()
2948
    my $biblio_has_holds = Koha::Holds->search({ biblionumber => $item->biblionumber, non_priority => 0 } )->count > 0;
2949
    if ( $biblio_has_holds && C4::Context->preference('AllowRenewalIfOtherItemsAvailable') && !Koha::Holds->search( { itemnumber => $itemnumber, found => undef } )->count()
2949
 )
2950
 )
2950
    {
2951
    {
2951
        my $biblio = Koha::Biblios->find($item->biblionumber);
2952
        my $biblio = Koha::Biblios->find($item->biblionumber);
Lines 2987-2995 sub CanBookBeRenewed { Link Here
2987
            return ( 0, "on_reserve" ) unless $fillable;
2988
            return ( 0, "on_reserve" ) unless $fillable;
2988
        }
2989
        }
2989
2990
2990
    } else {
2991
    } elsif ($biblio_has_holds) {
2991
        my ($status, $matched_reserve, $possible_reserves) = CheckReserves($itemnumber);
2992
        my ($status, $matched_reserve, $possible_reserves) = CheckReserves($itemnumber);
2992
        return ( 0, "on_reserve" ) if $matched_reserve;
2993
        return ( 0, "on_reserve" ) if $status;
2993
    }
2994
    }
2994
2995
2995
    return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok";
2996
    return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok";
2996
- 

Return to bug 31112