Details
-
Story
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
-
EPAM-Veg Sprint 31, EPAM-Veg Sprint 32, EPAM-Veg Sprint 33, EPAM-Veg Sprint 34, EPAM-Veg Sprint 35
-
8
-
Vega
Description
To see how this JIRA issue integrates with the other overdue fine JIRA issues please see the diagram at https://drive.google.com/file/d/1uzezgYpgZ8XiSmSdqC2fntda1HomjbP-/view?usp=sharing
OVERVIEW
Purpose: Module that will calculate and bill overdue fines when items are returned late (UIU-1147) or renewed after they are already overdue (UIU-1157). Post-MVP this module will also be called for the calculation of pending fees/fines UXPROD-392.
Assumptions: This module has been called AFTER the item has already been deemed to be returned/renewed after its due date and an Overdue Fine Policy has been proven to exist. In the case of renewed items, the Overdue Fine Policy field Forgive overdue fine if item renewed has been check and it is set to "No."
Inputs:
Loan record (used to calculate Overdue Fine)
- Due date (used by process called to find overdue minutes)
- Check in service point (used to set Create at in Fee/Fine Action record
- Loan policy (used by process called to find overdue minutes)
- Overdue fine policy (used by process called to find overdue minutes; will be added; see attached screen mock-up Automated Overdue Fines - Loan Details Changes.png)
- dueDateChangedByRecall (used by process called to find overdue minutes; this is an existing back-end flag that is not displayed in the UI)
Loan Policy record (used to calculate Overdue Fine)
- Grace period (used by process called to find overdue minutes)
- Loan period (used by process called to find overdue minutes)
Overdue Fine Policy record (used to calculate Overdue Fine)
- Overdue fine
- Count closed days/hours/minutes (used by process called to find overdue minutes)
- Maximum overdue fine
- Overdue recall fine
- Ignore grace periods for recalls (used by process called to find overdue minutes)
- Maximum recall overdue fine
Library Calendar at Settings>Calendar, to see when library is opened/closed, for libraries that only include open time in overdue calculation (used by process called to find overdue minutes)
Result from process Calculate intervals between due-date and returned/renewed-date (CIRC-548)
- overdueMinutes
Item record (used to find Fee/Fine Owner)
- Effective location for item
Fee/fee owner settings (used to find Fee/Fine Owner)
- Fee/fine owner
Organization settings (used to find Fee/Fine Owner)
- Location
- Service Point
Outputs:
See BILLING section below
Processing Considerations:
- Does library have a grace period? (A grace period is a short period of time after the due date during with the library allows the item to be returned with charging an overdue fine.)
- Does library count closed days? (Libraries may elect to include the minutes/hours/days they are closed as part of the overdue calculation. If they don't, the library's calendar must be used to determine if/when the library was opened for each day the item was overdue.)
- Is returned item the result of a recall? (Items that are requested by other patrons while they are checked out are called recalls. The patron who currently has the item checked out is given a certain amount of time to return the book. The institution may ignore the grace period for a recalled item.)
Calculation examples: See attached file Overdue Fine Calculation Examples.zip for many different calculation examples.
CALCULATION
The smallest allowable interval is minutes, so the best approach is to convert everything to minutes for the calculations, then convert back to hours, days, weeks or month as needed.
STEP #1: Calculate intervals between due-date and returned/renewed-date
- Call process created by
CIRC-548(Calculate intervals between due-date and returned/renewed-date) to obtain overdueMinutes
STEP #2: Determine what additional processing, if any, is appropriate
- If overdueMinutes = 0
- Exit this process because the patron does not owe an overdue fine for this item (they returned the item within the grace period)
- Else
- If *dueDateChangedByRecall = "true"
- Go to SECTION B: PROCESS RECALL
- Else
- Go to SECTION A: PROCESS NON-RECALL
- If *dueDateChangedByRecall = "true"
SECTION A: PROCESS NON-RECALL (dueDateChangedByRecall = "false" or blank)
STEP #3: Convert overdueMinutes to the interval used by Overdue fine (from the Overdue Fine Policy record)
- If Overdue fine interval = Hour(s)
- overdueInterval = overdueMinutes / 60, rounded up to next highest hour
- Else If Overdue fine interval = Day(s)
- overdueInterval = overdueMinutes / 1440, rounded up to next highest hour
- Else If Overdue fine interval = Week(s)
- overdueInterval = overdueMinutes / 10080, rounded up to next highest week
- Else If Overdue fine interval = Month(s)
- overdueInterval = overdueMinutes / 44640, rounded up to next highest month
- Else
- overdueInterval = overdueMinutes
If a book is overdue 7,886 minutes, and the Overdue fine interval for the book is Day(s), we would need to divide 7,886 by 1,440, which is 5.48. We would not charge for 5.48 days (which is 5 days plus a partial day) or round down to 5 days, but rather we would round up to 6 days. The patron did not return the book on the 5th day so it is 6 days overdue. It is not very likely that an Week(s) or Month(s), but we must allow for it.
STEP #4: Determine the overdue fine
- Billed amount = Overdue fine (from the Overdue Fine Policy record) * overdueInterval (calculated in STEP #3 above)
STEP #5: If the overdue fine is over the maximum allowed, reduce it to the maximum
- If Overdue Fine Policy field Maximum overdue fine > 0
- If Billed amount ((calculated in STEP #4 above)) > Overdue Fine Policy field Maximum overdue fine
- Set Billed amount = Overdue Fine Policy field Maximum overdue fine
- Else
- Leave Billed amount as is
- If Billed amount ((calculated in STEP #4 above)) > Overdue Fine Policy field Maximum overdue fine
- Else
- Leave Billed amount as is
STEP #6: Create fee/fine record, display checkin page message and trigger notice
- Go to BILLING
SECTION B: PROCESS RECALL (dueDateChangedByRecall = "true")
STEP #3: Convert overdueMinutes to the interval used by Recall overdue fine (from the Overdue Fine Policy record)
- If Recall overdue fine interval = Hour(s)
- overdueInterval = overdueMinutes / 60, rounded up to next highest hour
- Else If Recall overdue fine interval = Day(s)
- overdueInterval = overdueMinutes / 1440, rounded up to next highest hour
- Else If Recall overdue fine interval = Week(s)
- overdueInterval = overdueMinutes / 10080, rounded up to next highest week
- Else If Recall overdue fine interval = Month(s)
- overdueInterval = overdueMinutes / 44640, rounded up to next highest month
- Else
- overdueInterval = overdueMinutes
If a recalled book is overdue 7,886 minutes, and the Recall overdue fine interval for the book is Day(s), we would need to divide 7,886 by 1,440, which is 5.48. We would not charge for 5.48 days (which is 5 days plus a partial day) or round down to 5 days, but rather we would round up to 6 days. The patron did not return the book on the 5th day so it is 6 days overdue. It is not very likely that an Week(s) or Month(s), but we must allow for it.
STEP #4: Determine the overdue fine
- Billed amount = Recall overdue fine (from the Overdue Fine Policy record) * overdueInterval (calculated in STEP #3 above)
STEP #5: If the overdue fine is over the maximum allowed, reduce it to the maximum
- If Overdue Fine Policy field Maximum recall overdue fine > 0
- If Billed amount (calculated in STEP #4 above) > Overdue Fine Policy field Maximum recall overdue fine
- Set Billed amount = Overdue Fine Policy field Maximum recall overdue fine
- Else
- Leave Billed amount as is
- If Billed amount (calculated in STEP #4 above) > Overdue Fine Policy field Maximum recall overdue fine
- Else
- Leave Billed amount as is
STEP #6: Create fee/fine record, display checkin page message and trigger notice
- Go to BILLING
BILLING
Create a fee/fine record:
Save the overdue fine in the same manner as manual fees/fines are saved (as shown in the attached screen print Overdue-FF-Details.JPG)
Please note that changes to Fee/Fine Details will be made by UIU-1247
- Fee/fine type = "Overdue fine"
- Fee/fine owner = Use Effective location of item to find Service point within Organization settings, then use Service Point in Fee/Fine Owners settings to find associated Fee/fine owner
- Billed date = System date and time
- Billed amount = calculated overdue fine or recall overdue fine (depending on the situation) from STEP #4 above
- Remaining amount = calculated overdue fine or recall overdue fine (depending on the situation) from STEP #4 above
- Payment status = "Outstanding"
- Loan details = link to loan record
- Overdue policy = Overdue fine policy link from Loan record
- Lost item policy = Lost item fee policy link from Loan record
- Action date = System date and time
- Action = "Overdue fine"
- Amount = Billed amount from STEP #4 above
- Balance = Billed amount from STEP #4 above
- Transaction information = blank
- Created at = Check in service point
- Source should be "System"
- Additional information = blank
Send a patron notice:
Sending the notice is out scope for this user story...
TestRail: Results
Attachments
Issue Links
- blocks
-
CIRC-677 (1-OD-D) Overdue fine for item renewed late?
-
- Closed
-
-
FOLIO-2475 Release mod-circulation for Q1 2020
-
- Closed
-
-
UICHKIN-125 (1-OD-C) Overdue fine for item returned late?
-
- Closed
-
-
UIU-1247 (1-OD-E) Add link to Overdue Fine Policy and Lost Item Fee Policy on Fee/Fine Details page (plus other changes) and add overdue fines to FF Details/History
-
- Closed
-
- defines
-
UXPROD-109 Charge automated overdue fines
-
- Closed
-
- is blocked by
-
CIRC-548 (1-OD-B-1) Calculate intervals between due-date and returned/renewed-date
-
- Closed
-
-
CIRC-591 (1-OD-A) When item is checked out, save effective Overdue Fine Policy and Lost Item Policy to loan record
-
- Closed
-
- relates to
-
CIRC-680 Create fee/fine action when overdue fine is charged
-
- Closed
-
-
CIRC-657 IllegalArgumentException during item check-out
-
- Closed
-
-
CIRC-664 POST requests to /circulation/check-in-by-barcode fail with 500, NPE
-
- Closed
-
-
MODFEE-28 Create automatic FeeFine records on module initialization
-
- Closed
-