@@ -, +, @@ --- Koha/Item.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- a/Koha/Item.pm +++ a/Koha/Item.pm @@ -1104,6 +1104,20 @@ sub _set_found_trigger { return $self; } +=head3 to_api + +Overloaded to_api method to ensure item-level itypes is adhered to. + +=cut + +sub to_api { + my ($self, $params) = @_; + + $self->iteype( $self->effective_itemtype ); + $self->notforloan( $self->itemtype->notforloan ) unless $self->notforloan; + return $self->SUPER::to_api($params); +} + =head3 to_api_mapping This method returns the mapping for representing a Koha::Item object --