Koha::Account::Line - Koha accountline Object class
Return the patron linked to this account line
Return the manager linked to this account line
Return the item linked to this account line if exists
Return the checkout linked to this account line if exists
Returns a Koha::Library object representing where the accountline was recorded
Return the credit_type linked to this account line
Return the debit_type linked to this account line
Return the credit_offsets linked to this account line if some exist
Return the debit_offsets linked to this account line if some exist
my $credits = $accountline->credits; my $credits = $accountline->credits( $cond, $attr );
Return the credits linked to this account line if some exist. Search conditions and attributes may be passed if you wish to filter the resultant resultant resultset.
my $debits = $accountline->debits; my $debits = $accountline->debits( $cond, $attr );
Return the debits linked to this account line if some exist. Search conditions and attributes may be passed if you wish to filter the resultant resultant resultset.
$payment_accountline->void({ interface => $interface, [ staff_id => $staff_id, branch => $branchcode ] });
Used to 'void' (or reverse) a payment/credit. It will roll back any offsets created by the application of this credit upon any debits and mark the credit as 'void' by updating it's status to "VOID".
$debit_accountline->cancel();
Cancel a charge. It will mark the debit as 'cancelled' by updating its status to 'CANCELLED'.
Charges that have been fully or partially paid cannot be cancelled.
Returns the cancellation accountline.
$charge_accountline->reduce({ reduction_type => $reduction_type });
Used to 'reduce' a charge/debit by adding a credit to offset against the amount outstanding.
May be used to apply a discount whilst retaining the original debit amounts or to apply a full or partial refund for example when a lost item is found and returned.
It will immediately be applied to the given debit unless the debit has already been paid, in which case a 'zero' offset will be added to maintain a link to the debit but the outstanding credit will be left so it may be applied to other debts.
Reduction type may be one of:
* REFUND * DISCOUNT
Returns the reduction accountline (which will be a credit)
my $debits = $account->outstanding_debits; my $credit = $credit->apply( { debits => $debits } );
Applies the credit to a given debits array reference.
$credit_accountline->payout( { payout_type => $payout_type, register_id => $register_id, staff_id => $staff_id, interface => 'intranet', amount => $amount } );
Used to 'pay out' a credit to a user.
Payout type may be one of any existing payment types
Returns the payout debit line that is created via this transaction.
This method allows updating a debit or credit on a patron's account
$account_line->adjust( { amount => $amount, type => $update_type, interface => $interface } );
$update_type can be any of: - overdue_update
Authors Note: The intention here is that this method is only used to adjust accountlines where the final amount is not yet known/fixed. Incrementing fines are the only existing case at the time of writing, all other forms of 'adjustment' should be recorded as distinct credits or debits and applied, via an offset, to the corresponding debit or credit.
my $bool = $line->is_credit;
my $bool = $line->is_debit;
This method returns the mapping for representing a Koha::Account::Line object on the API.
my $bool = $line->is_renewable;
my $renew_result = $line->renew_item;
Conditionally attempt to renew an item and return the outcome. This is as a consequence of the fine on an item being fully paid off. Caller must call is_renewable before.
Specific store method to generate credit number before saving
Kyle M Hall <kyle@bywatersolutions.com > Tomás Cohen Arazi <tomascohen@theke.io> Martin Renvoize <martin.renvoize@ptfs-europe.com>