<<

NAME

Koha::Account::Line - Koha accountline Object class

API

Class methods

item

Return the item linked to this account line if exists

checkout

Return the checkout linked to this account line if exists

void

  $payment_accountline->void();

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".

apply

    my $debits = $account->outstanding_debits;
    my $outstanding_amount = $credit->apply( { debits => $debits, [ offset_type => $offset_type ] } );

Applies the credit to a given debits set.

arguments hashref

debits - Koha::Account::Lines object set of debits
offset_type (optional) - a string indicating the offset type (valid values are those from the 'account_offset_types' table)

adjust

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.

is_credit

    my $bool = $line->is_credit;

is_debit

    my $bool = $line->is_debit;

Internal methods

_type

Name mappings

$allowed_update

AUTHORS

Kyle M Hall <kyle@bywatersolutions.com > Tomás Cohen Arazi <tomascohen@theke.io> Martin Renvoize <martin.renvoize@ptfs-europe.com>

<<