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
Purpose: Automatically calculate and bill overdue fines when items are renewed after they have become overdue.
Inputs: Loan record (which contains due-date, returned-date, Overdue Fine Policy link), Overdue Fine Policy (which contains Forgive overdue fine if item renewed)
Given item renewed
When item due-date ready to be changed
Then determine if renewed item could be overdue
Given determine if renewed item could be overdue
When original-due-date is after returned-date OR Loan record Overdue Fine Policy does not exist OR Overdue Fine Policy field Forgive overdue fine if item renewed is set to "Yes"
Then stop all further overdue processing of renewed item
Given renewed item qualifies for further overdue processing
When original-due-date is before or on returned date AND Loan record Overdue Fine Policy does exist AND Overdue Fine Policy field Forgive overdue fine if item renewed is set to "No"
Then call module to calculate overdue fine (module is defined in
(Note: Item may still not be charged an overdue fine, but it needs further checking to determine that.)
A shared module will be called (see
UIU-1242) to calculate the actual overdue fine. This user story is for determining if the shared module should be called when an item is renewed. If the item is clearly not overdue (due-date is after returned-date) or there is not a Overdue Fine Policy associated with the Loan (Loan record Overdue Fine Policy does not exist) or the library doesn't charge for overdue books when they are renewed (Overdue Fine Policy field Forgive overdue fine if item renewed is set to "Yes") , there is no reason to call the module that calculates the overdue fine. In all other cases the module to calculate the overdue fine should be called. The result may be that there still isn't a fine changed, due to grace periods, etc., but the processing needs to be done.