Bug 23414: Use effective_itemtype
We should use effective_itemtype instead of itype to take the item-level_itypes pref into account. Note that we should not need to test for the existence of the key as we now assume that item types are correctly set to a valid item type. Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
89cd2c4400
commit
032343b98d
|
|
@ -334,7 +334,10 @@ sub buildKohaItemsNamespace {
|
|||
elsif ($item->onloan) {
|
||||
$status = "Checked out";
|
||||
}
|
||||
elsif ( $item->notforloan && $item->notforloan > 0 || $item->itype && $itemtypes->{ $item->itype }->{notforloan} && $itemtypes->{ $item->itype }->{notforloan} == 1 ) {
|
||||
elsif ( $item->notforloan && $item->notforloan > 0
|
||||
|| exists $itemtypes->{ $item->effective_itemtype }
|
||||
&& $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 )
|
||||
{
|
||||
$status = "reference";
|
||||
}
|
||||
elsif ( $item->notforloan < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue