Koha::Item - Koha Item object class
Returns the itemtype for the item based on whether item level itemtypes are set or not.
my $biblio = $item->biblio;
Return the bibliographic record of this item
my $biblioitem = $item->biblioitem;
Return the biblioitem record of this item
my $checkout = $item->checkout;
Return the checkout for this item
my $transfer = $item->get_transfer;
Return the transfer if the item is in transit or undef
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();
my $bool = $item->can_article_request( $borrower )
Returns true if item can be specifically requested
$borrower must be a Koha::Patron object
my $bool = $item->hidden_in_opac({ [ rules => $rules ] })
Returns true if item fields match the hidding criteria defined in $rules. Returns false otherwise.
Takes HASHref that can have the following parameters: OPTIONAL PARAMETERS: $rules : { <field> => [ value_1, ... ], ... }
Note: $rules inherits its structure from the parsed YAML from reading the OpacHiddenItems system preference.
$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.
my $type = $item->article_request_type( $borrower )
returns 'yes', 'no', 'bib_only', or 'item_only'
$borrower must be a Koha::Patron object
my $sritem = Koha::Item->stockrotationitem;
Returns the stock rotation item associated with the current item.
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.
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
Kyle M Hall <kyle@bywatersolutions.com>