<<

NAME

Koha::Item - Koha Item object class

API

Class methods

effective_itemtype

Returns the itemtype for the item based on whether item level itemtypes are set or not.

home_branch

holding_branch

biblio

my $biblio = $item->biblio;

Return the bibliographic record of this item

biblioitem

my $biblioitem = $item->biblioitem;

Return the biblioitem record of this item

checkout

my $checkout = $item->checkout;

Return the checkout for this item

get_transfer

my $transfer = $item->get_transfer;

Return the transfer if the item is in transit or undef

last_returned_by

Gets and sets the last borrower to return an item.

Accepts and returns Koha::Patron objects

$item->last_returned_by( $borrowernumber );

$last_returned_by = $item->last_returned_by();

can_article_request

my $bool = $item->can_article_request( $borrower )

Returns true if item can be specifically requested

$borrower must be a Koha::Patron object

can_be_transferred

$item->can_be_transferred({ to => $to_library, from => $from_library }) Checks if an item can be transferred to given library.

This feature is controlled by two system preferences: UseBranchTransferLimits to enable / disable the feature BranchTransferLimitsType to use either an itemnumber or ccode as an identifier for setting the limitations

Takes HASHref that can have the following parameters: MANDATORY PARAMETERS: $to : Koha::Library OPTIONAL PARAMETERS: $from : Koha::Library # if not given, item holdingbranch # will be used instead

Returns 1 if item can be transferred to $to_library, otherwise 0.

To find out whether at least one item of a Koha::Biblio can be transferred, please see Koha::Biblio->can_be_transferred() instead of using this method for multiple items of the same biblio.

article_request_type

my $type = $item->article_request_type( $borrower )

returns 'yes', 'no', 'bib_only', or 'item_only'

$borrower must be a Koha::Patron object

current_holds

stockrotationitem

  my $sritem = Koha::Item->stockrotationitem;

Returns the stock rotation item associated with the current item.

add_to_rota

  my $item = $item->add_to_rota($rota_id);

Add this item to the rota identified by $ROTA_ID, which means associating it with the first stage of that rota. Should this item already be associated with a rota, then we will move it to the new rota.

has_pending_hold

  my $is_pending_hold = $item->has_pending_hold();

This method checks the tmp_holdsqueue to see if this item has been selected for a hold, but not filled yet and returns true or false

Internal methods

_type

AUTHOR

Kyle M Hall <kyle@bywatersolutions.com>

<<