`$can_item_be_reserved eq 'OK'` moved in `&&` before `IsAvailableForItemLevelRequest`
to cut away with static known values before calling to more resource consuming subroutine.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
if (
!$item->{cantreserve}
&& !$exceeded_maxreserves
- && IsAvailableForItemLevelRequest($item_object, $patron)
&& $can_item_be_reserved eq 'OK'
+ && IsAvailableForItemLevelRequest($item_object, $patron)
)
{
$item->{available} = 1;