Bug 26144

Summary: Due date should not be subtracted from billable days with FinesCalendar on
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bwsdonna, gmcharlt, kyle, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2020-08-05 13:49:31 UTC
To recreate:
- set finesCalendar to ignore the calendar
- set circ rules to charge $1 per day, no grace period
- set library as closed yesterday on calendar
- check item out with due date of yesterday
- run fines.pl
- see patron has $1 fine

- change finesCalendar to use the calendar
- check item out with due date of yesterday
- run fines.pl
- see patron has no fine

When we count billable days for the fine, we don't count the due date itself. So we should not count the due date when counting holidays to be subtracted from the billable days.
Comment 1 Katrin Fischer 2023-09-22 19:05:40 UTC
I believe the calculation to be correct.

Ignore the calendar = ignore the holidays.

The item is due yesterday, the first fine is calculated the following day.

Assuming:
* grace period = 0
* fine interval = 1
* charge at beginning of fine interval