Automatically Place and Remove Fine-Based Restrictions

Automatically Place and Remove Fine-Based Restrictions

In addition to adding restrictions based on items' overdue status with the Restrict option in Overdue notice/status triggers, libraries sometimes want to restrict patrons based solely on the amount of money they owe, regardless of items' overdue status or the reason(s) for the charge(s). The debar_patrons_with_fines.pl cron can do this automatically, eliminating the need for libraries to add fine-based restrictions on a case-by-case basis.

Blocks vs. Restrictions

First, consider whether your library needs a restriction or can use a block. Libraries already have the ability to block patrons from checking out new materials if they owe over the amount(s) set in the NoIssuesCharge, NoIssuesChargeGuarantees, or  NoIssuesChargeGuarantorsWithGuarantees system preferences. Staff can override that block if AllowFineOverride system preference is set to "[Allow] staff to manually override and check out items to patrons who have more in fines than set in the noissuescharge system preference" and they have the Force checkout if a limitation exists (force_checkout) permission. 

If those are set as above, and a staff member tries to check out an item to a patron who owes over the NoIssuesCharge amount but does not have a restriction, they will see this screen:


If, using the same settings described above, staff try to check out an item to a patron with a restriction, they will see:



If AllowFineOverride is set to "[Don't allow] staff to manually override and check out items to patrons who have more in fines than set in the noissuescharge system preference", only staff with the force_checkout permission will be able to check items out in both of these circumstances.

Additionally, keep in mind that using restrictions allows your library to set RestrictionBlockRenewing: "If a patron is restricted, [allow/block] renewing of items from the staff interface and via the misc/cronjobs/automatic_renewals.pl cronjob." There is no equivalent system preference for NoIssuesCharge, so if your library wants to prevent renewals for patrons who owe over a specified amount separate from overdue status, you may want to consider this cron.

Setup

Since this feature is controlled by the debar_patrons_with_fines.pl cron rather than a system preference, ByWater libraries will need to submit a support ticket for us to enable it. There are parameters to consider:
  1. Amount: The amount over which you want patrons to be automatically restricted. Note that this is over, not equal to or over, the limit indicated. So, if your library wants patrons restricted when they owe $50 or more, the cron needs to be set for $49.99. If patrons should be restricted when they owe over $50 (so, starting at $50.01), request that the cron be set for $50.
  2. Message: The restriction comment you want added to patrons' accounts when this restriction is placed. The type of the restriction will display with the comment.
  3. OPTIONAL - Expiration: The date on which you want the restriction to expire automatically, regardless of whether the fees that prompted it have been paid. 
The cron can be run at a frequency that makes sense for your library. For instance, it can be run annually to block students and faculty who owe money at the end of a school year. Or it can be run more frequently - perhaps weekly or monthly - to restrict patrons who owe above the specified amount.

Please include the information above in your support ticket based on your library's needs.

The cron uses the FINES type restriction. This is not configurable.
Alert
The cron used the MANUAL restriction type prior to Bug 39532 - Script debar_patrons_with_fines.pl should not use MANUAL restriction type, so libraries who have been using the cron before February 2026 may have restrictions placed by cron that show the MANUAL type.

When the cron runs, patrons with fees over the amount set in the cron will automatically have a restriction placed on their account. These will show in patron accounts like any other restriction, which means that they can be manually deleted from a patron's Restrictions tab. Like other restrictions, they can also be temporarily overridden by staff with the force_checkout permission.

Removing the Restriction

There are multiple options for removing restrictions placed by this cron. 

Automatic removal based on balance: Libraries can automatically clear restrictions when patrons pay their fines below a specified amount.

To set this up:
  1. Start in Administration > Patron restriction types
  2. Click the Edit button on the FINES restriction line
  3. Switch 'Lift after payment' to Yes
  4. In 'Fee limit', enter the amount that a patron's balance should be equal to or under once payment is made for the restriction to lift. Note that while the manual says "restrictions using this type will be automatically lifted after payments equal to or exceeding the amount defined in 'Fee Limit'", Koha is actually looking for the balance after payment, not the amount paid. And note that while the –amount flag in the cron to set the restriction is looking for fees over that number (fees > X), the 'Fee limit' amount is equal to or under (fees =< X). For instance, if patrons must owe under $50, set this to $49.99. If they can owe up to $50 without a restriction, set this to $50.
Automatic removal based on time: Libraries can use the cron's –expiration parameter to set a date at which the restriction will automatically be lifted, regardless of the patron's remaining balance. In general, this option will only be useful for libraries who run the cron annually or perhaps semi-annually, since the date needs to be set in the cron itself. Libraries who use this option will need to contact their support company to update the date in the cron. 

Manual deletion: Staff with the Manage restrictions for accounts (manage_restrictions) permission can manually delete restrictions.
    • Related Articles

    • Koha 25.11: Managers' Overview

      Overview This document is intended for managers who want to evaluate how select new features may impact day-to-day operations, and whether staff training may be needed to take advantage of enhancements in this upgrade. It is not intended to replace ...
    • Fines and Going Fine Free

      This is an outline of how overdue fines are managed in Koha and instructions for making your library fine free. Fines Fines will be charged based on your circulation and fines rules. Hold fees will be charged based on the rules you set in the Patron ...
    • Koha Glossary of Terms

      Find the basics of Koha's vocabulary here. Additional resources: Polaris to Koha Glossary Symphony to Koha Glossary Aspen/Koha Glossary This glossary is in alphabetical order. Use control+F to quickly search this page for specific terms. Authority ...
    • Managing Patron Accounts

      Koha has many options and tools for managing patron accounts. Customize the Patron Registration Form Libraries can customize which patron fields display on the form, which fields are mandatory and which fields are collapsed within the patron detail ...
    • Global and Local Settings in Koha

      This is a guide to Koha settings that apply to all libraries sharing one Koha instance and those settings that can be configured by library. This is not exhaustive. Instead, the focus is on those settings that are most relevant to consortia and large ...