Bug 39405 - New hook overwrite_calc_fine for graduated fines calculation
Summary: New hook overwrite_calc_fine for graduated fines calculation
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Raphael Straub
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-21 07:53 UTC by Michaela Sieber
Modified: 2025-03-21 10:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This new hook allows to overwrite the koha standard calculation of fines. This can be useful if your library has a fine policy with graduated fines per overdue letter.
Version(s) released in:
Circulation function:


Attachments
Bug 39405: Add hook overwrite_calc_fine to override CalcFine in Overdues.pm (5.91 KB, patch)
2025-03-21 10:41 UTC, Raphael Straub
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michaela Sieber 2025-03-21 07:53:41 UTC
This new hook allows to overwrite the koha standard calculation of fines. 
This can be useful if your library has a fine policy with graduated fines per overdue letter (very popular in german academic libraries)
This hook is implemented in the CalcFine method which is defined in overdue.pm
Comment 1 Raphael Straub 2025-03-21 10:41:43 UTC
Created attachment 179582 [details] [review]
Bug 39405: Add hook overwrite_calc_fine to override CalcFine in Overdues.pm

This new hook allows to overwrite the koha standard calculation of fines.
This can be useful if your library has a fine policy with graduated fines
per overdue letter.

To test:
1) Apply patch.
2) Run prove -v t/db_dependent/Circulation/CalcFine.t
3) Run prove -v t/db_dependent/Koha/Plugins/Overdues.t
4) Sign off.

Sponsored-by: Karlsruhe Institute of Technology (KIT)