<<

Koha::Patron::Debarments

Koha::Patron::Debarments - Module for managing patron debarments

GetDebarments

my $arrayref = GetDebarments({ borrowernumber => $borrowernumber [, key => $value ] );

AddDebarment

my $success = AddDebarment({ borrowernumber => $borrowernumber, expiration => $expiration, type => $type, ## enum('FINES','OVERDUES','MANUAL') comment => $comment, });

Creates a new debarment.

Required keys: borrowernumber, type

DelDebarment

my $success = DelDebarment( $borrower_debarment_id );

Deletes a debarment.

ModDebarment

my $success = ModDebarment({ borrower_debarment_id => $borrower_debarment_id, expiration => $expiration, type => $type, ## enum('FINES','OVERDUES','MANUAL','DISCHARGE') comment => $comment, });

Updates an existing debarment.

Required keys: borrower_debarment_id

AddUniqueDebarment

my $success = AddUniqueDebarment({ borrowernumber => $borrowernumber, type => $type, expiration => $expiration, comment => $comment, });

Creates a new debarment of the type defined by the key type. If a unique debarment already exists of the given type, it is updated instead. The current unique debarment types are OVERDUES, and SUSPENSION

Required keys: borrowernumber, type

DelUniqueDebarment

my $success = _DelUniqueDebarment({ borrowernumber => $borrowernumber, type => $type, });

Deletes a unique debarment of the type defined by the key type. The current unique debarment types are OVERDUES, and SUSPENSION

Required keys: borrowernumber, type

_UpdateBorrowerDebarmentFlags

my $success = _UpdateBorrowerDebarmentFlags( $borrowernumber );

So as not to create additional latency, the fields borrowers.debarred and borrowers.debarredcomment remain in the borrowers table. Whenever the a borrowers debarrments are modified, this subroutine is run to decide if the borrower is currently debarred and update the 'quick flags' in the borrowers table accordingly.

_GetBorrowernumberByDebarmentId

my $borrowernumber = _GetBorrowernumberByDebarmentId( $borrower_debarment_id );

AUTHOR

Kyle M Hall <kyle@bywatersoltuions.com>

<<