<<

NAME

Koha::Checkout - Koha Checkout object class

API

Class methods

is_overdue

my $is_overdue = $checkout->is_overdue( [ $reference_dt ] );

Return 1 if the checkout is overdue.

A reference date can be passed, in this case it will be used, otherwise today will be the reference date.

item

my $item = $checkout->item;

Return the checked out item

account_lines

my $account_lines = $checkout->account_lines;

Return the checked out account_lines

library

my $library = $checkout->library;

Return the library in which the transaction took place

patron

my $patron = $checkout->patron

Return the patron for who the checkout has been done

issuer

my $issuer = $checkout->issuer

Return the patron by whom the checkout was done

renewals

  my $renewals = $checkout->renewals;

Return a Koha::Checkouts::Renewals set attached to this checkout

attempt_auto_renew

  my ($success, $error, $updated) = $checkout->auto_renew({ confirm => 1 });

Attempt to automatically renew a book. Return error reason if it cannot be renewed. Also return whether a change has been made to avoid notifying on more than one attempt.

If not passed confirm, we will only report and no changes will be made.

to_api_mapping

This method returns the mapping for representing a Koha::Checkout object on the API.

claim_returned

  my $return_claim = $checkout->claim_returned();

This method sets the checkout as claimed return. It will:

1. Add a new row to the `return_claims` table 2. Set the item as lost using the 'ClaimReturnedLostValue' 3. Charge a fee depending on the value of ClaimReturnedChargeFee 3a. If set to charge, then accruing overdues will be halted 3b. If set to charge, then any existing transfers will be cancelled and the holding branch will be set back to 'frombranch'. 4. The issue will be marked as returned as per the 'MarkLostItemsAsReturned' preference

Internal methods

_type

AUTHOR

Kyle M Hall <kyle@bywatersolutions.com>

Jonathan Druart <jonathan.druart@bugs.koha-community.org>

<<