The strange case of vanishing fines

The error aka “zor ka jhatkaa”

Last week a client partner raised a rather interesting support ticket: when they are checking in overdue items with fines, the fines seem to be vanishing. No, they were not waiving anything, the fines were simply going away and no record of there being ever a fine or its waiver were showing up in the Accounting tab of the patron.

The investigation

Turns out this was indeed happening. The instance was Koha 21.05.07 running on Debian 10.11 using MariaDB 10.3 running without plack. The evidence the fines been reset to zero and removed was available in the “Log viewer” under the Tools menu.

The solution

Doing a diff on the database backup of the table circulation_rules between the database backup from 2 days before and the one from that day, revealed that the day before, the client had re-jigged their circulation rules during which they had inadvertently changed the Fine interval aka chargeperiod setting from “1” to blank.

As the user manual says :

Enter the ‘Fine charging interval’ in the unit you set (ex. charge fines every 1 day, or every 2 hours). The finesCalendar system preference controls whether the days the library is closed will be taken into account or not.

In this specific instance, not only was the finesMode system preference set to “Calculate and charge” with fines being charged by the daily cron job, it also had CalculateFinesOnReturn system preference set to “Do”. Thus, while the cron job was creating and then updating fines once a day, the CalculateFinesOnReturn triggered at the time of check-in was resetting the fines to “0” as the chargeperiod was not set. This was why the fines were disappearing.

The simple fix was to ensure that for all the circulation rules the chargeperiod was set to “1”. And immediately the problem went away.

1 thought on “The strange case of vanishing fines”

Leave a Reply

Your email address will not be published. Required fields are marked *