C4::Members - Perl Module containing convenience functions for member handling
use C4::Members;
This module contains routines for adding, modifying and deleting members/patrons/borrowers
$flags = &patronflags($patron);
This function is not exported.
The following will be set where applicable: $flags->{CHARGES}->{amount} Amount of debt $flags->{CHARGES}->{noissues} Set if debt amount >$5.00 (or syspref noissuescharge) $flags->{CHARGES}->{message} Message -- deprecated
$flags->{CREDITS}->{amount} Amount of credit $flags->{CREDITS}->{message} Message -- deprecated $flags->{ GNA } Patron has no valid address $flags->{ GNA }->{noissues} Set for each GNA $flags->{ GNA }->{message} "Borrower has no valid address" -- deprecated $flags->{ LOST } Patron's card reported lost $flags->{ LOST }->{noissues} Set for each LOST $flags->{ LOST }->{message} Message -- deprecated $flags->{DBARRED} Set if patron debarred, no access $flags->{DBARRED}->{noissues} Set for each DBARRED $flags->{DBARRED}->{message} Message -- deprecated $flags->{ NOTES } $flags->{ NOTES }->{message} The note itself. NOT deprecated $flags->{ ODUES } Set if patron has overdue books. $flags->{ ODUES }->{message} "Yes" -- deprecated $flags->{ ODUES }->{itemlist} ref-to-array: list of overdue books $flags->{ ODUES }->{itemlisttext} Text list of overdue items -- deprecated $flags->{WAITING} Set if any of patron's reserves are available $flags->{WAITING}->{message} Message -- deprecated $flags->{WAITING}->{itemlist} ref-to-array: list of available items
$flags->{ODUES}->{itemlist}
is a reference-to-array listing the overdue items. Its elements are references-to-hash, each describing an overdue item. The keys are selected fields from the issues, biblio, biblioitems, and items tables of the Koha database.$flags->{ODUES}->{itemlisttext}
is a string giving a text listing of the overdue items, one per line. Deprecated.$flags->{WAITING}->{itemlist}
is a reference-to-array listing the available items. Each element is a reference-to-hash whose keys are fields from the reserves table of the Koha database.All the "message" fields that include language generated in this function are deprecated, because such strings belong properly in the display layer.
The "message" field that comes from the DB is OK.
$issues = &GetAllIssues($borrowernumber, $sortkey, $limit);
Looks up what the patron with the given borrowernumber has borrowed, and sorts the results.
$sortkey
is the name of a field on which to sort the results. This should be the name of a field in the issues
, biblio
, biblioitems
, or items
table in the Koha database.
$limit
is the maximum number of results to return.
&GetAllIssues
an arrayref, $issues
, of hashrefs, the keys of which are the fields from the issues
, biblio
, biblioitems
, and items
tables of the Koha database.
my ($min, $max) = C4::Members::get_cardnumber_length()
Returns the minimum and maximum length for patron cardnumbers as determined by the CardnumberLength system preference, the BorrowerMandatoryField system preference, and the width of the database column.
$borrowers = &GetBorrowersToExpunge( not_borrowed_since => $not_borrowed_since, expired_before => $expired_before, category_code => $category_code, patron_list_id => $patron_list_id, branchcode => $branchcode ); This function get all borrowers based on the given criteria.
IssueSlip($branchcode, $borrowernumber, $quickslip) Returns letter hash ( see C4::Letters::GetPreparedLetter ) $quickslip is boolean, to indicate whether we want a quick slip IssueSlip populates ISSUESLIP and ISSUEQSLIP, and will make the following expansions: Both slips: <<branches.*>> <<borrowers.*>> ISSUESLIP: <checkedout> <<biblio.*>> <<items.*>> <<biblioitems.*>> <<issues.*>> </checkedout> <overdue> <<biblio.*>> <<items.*>> <<biblioitems.*>> <<issues.*>> </overdue> <news> <<opac_news.*>> </news> ISSUEQSLIP: <checkedout> <<biblio.*>> <<items.*>> <<biblioitems.*>> <<issues.*>> </checkedout> NOTE: Fields from tables issues, items, biblio and biblioitems are available
Delete accounts that haven't been upgraded from the 'temporary' category Returns the number of removed patrons
Delete all unverified self registrations in borrower_modifications, older than the specified number of days.
Koha Team