<<

NAME

Koha::Accounts - Module for managing payments and fees for patrons

pay

This method allows payments to be made against fees/fines

Koha::Account->new( { patron_id => $borrowernumber } )->pay( { amount => $amount, sip => $sipmode, note => $note, description => $description, library_id => $branchcode, lines => $lines, # Arrayref of Koha::Account::Line objects to pay account_type => $type, # accounttype code offset_type => $offset_type, # offset type code } );

add_credit

This method allows adding credits to a patron's account

my $credit_line = Koha::Account->new({ patron_id => $patron_id })->add_credit( { amount => $amount, description => $description, note => $note, user_id => $user_id, library_id => $library_id, sip => $sip, payment_type => $payment_type, type => $credit_type, item_id => $item_id } );

$credit_type can be any of: - 'credit' - 'payment' - 'forgiven' - 'lost_item_return' - 'writeoff'

balance

my $balance = $self->balance

Return the balance (sum of amountoutstanding columns)

outstanding_debits

my $lines = Koha::Account->new({ patron_id => $patron_id })->outstanding_debits;

outstanding_credits

my $lines = Koha::Account->new({ patron_id => $patron_id })->outstanding_credits;

non_issues_charges

my $non_issues_charges = $self->non_issues_charges

Calculates amount immediately owing by the patron - non-issue charges.

Charges exempt from non-issue are: * Res (holds) if HoldsInNoissuesCharge syspref is set to false * Rent (rental) if RentalsInNoissuesCharge syspref is set to false * Manual invoices if ManInvInNoissuesCharge syspref is set to false

Name mappings

$offset_type

$account_type

AUTHOR

Kyle M Hall <kyle.m.hall@gmail.com>

<<