Bug 27058: (follow-up) Clarify notforloan checks with a comment
In IsAvailableForItemLevelRequest the check is for holdability and in
ItemsAnyAvailableAndNotRestricted the check is for
checkoutability. These comments should make it more clear because the
notforloan value is used for these two different purposes and is a bit
confusing (we might want to add a new field "notforhold" in future to
make the code self documenting)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9dcceb66fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
a311a5a805
commit
6f60fa35b4
|
|
@ -1317,7 +1317,7 @@ sub IsAvailableForItemLevelRequest {
|
|||
return 0 if
|
||||
$notforloan_per_itemtype ||
|
||||
$item->itemlost ||
|
||||
$item->notforloan > 0 ||
|
||||
$item->notforloan > 0 || # item with negative or zero notforloan value is holdable
|
||||
$item->withdrawn ||
|
||||
($item->damaged && !C4::Context->preference('AllowHoldsOnDamagedItems'));
|
||||
|
||||
|
|
@ -1378,7 +1378,7 @@ sub ItemsAnyAvailableAndNotRestricted {
|
|||
# we can return (end the loop) when first one found:
|
||||
return 1
|
||||
unless $i->itemlost
|
||||
|| $i->notforloan
|
||||
|| $i->notforloan # items with non-zero notforloan cannot be checked out
|
||||
|| $i->withdrawn
|
||||
|| $i->onloan
|
||||
|| IsItemOnHoldAndFound( $i->id )
|
||||
|
|
|
|||
Loading…
Reference in New Issue