C4::Accounts - Functions for dealing with Koha accounts
The functions in this module deal with the monetary aspect of Koha, including looking up and modifying the amount of money owed by a patron.
$nextacct = &getnextacctno($borrowernumber);
Returns the next unused account number for the patron with the given borrower number.
In a default install of Koha the following lost values are set 1 = Lost 2 = Long overdue 3 = Lost and paid for
FIXME: itemlost should be set to 3 after payment is made, should be a warning to the interface that a charge has been added FIXME : if no replacement price, borrower just doesn't get charged?
&manualinvoice($borrowernumber, $itemnumber, $description, $type, $amount, $note);
$borrowernumber is the patron's borrower number.
$description is a description of the transaction.
$type may be one of
$itemnumber is the item involved, if pertinent; otherwise, it should be the empty string.
purge_zero_balance_fees( $days );
Delete accountlines entries where amountoutstanding is 0 or NULL which are more than a given number of days old.
$days -- Zero balance fees older than $days days old will be deleted.
Warning: Because fines and payments are not linked in accountlines, it is possible for a fine to be deleted without the accompanying payment, or vise versa. This won't affect the account balance, but might be confusing to staff.