Commit 3f628573 authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen Committed by Petter Goksøyr Åsen
Browse files

DEICH-5950 canItemBeRenewed: fix number of holds vs available items check

parent 72a9a8ee
......@@ -880,7 +880,7 @@ sub canItemBeRenewed {
if ($self->Deichman::Item::CanItemFillHold()) {
my $ignoreFound = 1;
try { $self->Deichman::Item::GetBiblioReserves($ignoreFound) };
if (scalar @{$self->{biblioHolds}} > $self->Deichman::Item::AvailableItemsCount()) {
if (scalar @{$self->{biblioHolds}} >= $self->Deichman::Item::AvailableItemsCount()) {
$self->{error} = Core::Exception::Circulation::RenewErrorWithMessage->new("on_hold");
return $self;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment