Bug ID: 23051
Summary: Optionally renew fine accruing items when all fines on
item are paid off
Change sponsored?: ---
Priority: P5 - low
Assignee: [hidden email] Reporter: [hidden email] QA Contact: [hidden email] CC: [hidden email], [hidden email] Target Milestone: ---
Currently, if a user pays an accruing fine on an overdue item but forgets to
renew the item fines start accruing again.
If a user pays off the amount outstanding on an item with an accruing fine
(accounttype "OVERDUE" & status "UNRETURNED" in 19.05) via the OPAC or
self-service, or a member of staff takes payment in the staff client, attempt
to automatically renew the item according to circulation rules.
This behaviour should be controlled by a new syspref
"RenewAccruingItemWhenPaid" which is initially turned off.
When the RenewAccruingItemWhenPaid syspref is enabled and all the fines
on an item that is accruing fines are paid, we automatically renew that
item to prevent it from starting to accrue fines again.
This patch adds an additional argument to C4::Circulation::AddRenewal
which allows us to skip the calculation of fines upon renewal, which we
don't want to do if the fines on that item have just been paid. Existing
calls to AddRenewal have not been amended because there seems to be a
convention of only passing undef when adding arguments that require
their positioning to be maintained. Since the new argument is the last
one, this is not the case with any existing call.
- In Administration, search for the new syspref "RenewAccruingItemWhenPaid"
- TEST: Observe that the new syspref exists and is turned off by default
- Turn on the syspref
- Loan an item to a patron, ensure you choose a patron, branch and item
combination that will incur overdue fines
- Backdate the due date to the past so the loan will accrue fines
- Run the fines.pl cronjob (misc/cronjobs/fines.pl)
- Go to the patron's "Accounting" page and choose "Pay" against the item that
has the fine
- Enter an amount to pay that will fully pay off the item and click "Confirm"
- Go to the patron's checkouts list
- TEST: Observe that the item has been renewed as part of the fine payment