Koha::Checkout - Koha Checkout object class
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.
my $item = $checkout->item;
Return the checked out item
my $account_lines = $checkout->account_lines;
Return the checked out account_lines
my $fines = $checkout->overdue_fines;
Return the account lines for just the overdue fines
my $library = $checkout->library;
Return the library in which the transaction took place
my $patron = $checkout->patron
Return the patron for who the checkout has been done
my $issuer = $checkout->issuer
Return the patron by whom the checkout was done
my $renewals = $checkout->renewals;
Return a Koha::Checkouts::Renewals set attached to this checkout
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.
This method returns the mapping for representing a Koha::Checkout object on the API.
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
Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart <jonathan.druart@bugs.koha-community.org>