Koha::Patron::Debarments - Module for managing patron debarments
my $success = AddDebarment({ borrowernumber => $borrowernumber, expiration => $expiration, type => $type, ## enum('FINES','OVERDUES','MANUAL') comment => $comment, });
Creates a new debarment.
Required keys: borrowernumber, type
my $success = DelDebarment( $borrower_debarment_id );
Deletes a debarment.
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
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
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
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.
my $success = del_restrictions_after_payment({ borrowernumber => $borrowernumber, });
Deletes any restrictions from patron by following the rules defined in "Patron restrictions".
my $borrowernumber = _GetBorrowernumberByDebarmentId( $borrower_debarment_id );
Kyle M Hall <kyle@bywatersoltuions.com>