]> git.koha-community.org Git - koha.git/commit
Bug 23051: Renew items when fines paid off
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Tue, 11 Jun 2019 13:17:17 +0000 (14:17 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 10:01:31 +0000 (10:01 +0000)
commitd26a10c1fedf55a7e85387e6555601e41db0e043
tree7fb890ed236e71dcdc2352385c7862bd79698eab
parent5f853ca1179ab4c69262d65370e0a6f51764dc47
Bug 23051: Renew items when fines paid 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.

Sponsored-by: Loughborough University
Signed-off-by: Lucy Harrison <L.M.Harrison@lboro.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Circulation.pm
Koha/Account.pm
Koha/Account/Line.pm