Grace period auto extension and backdate awareness
Grace period auto extension:
Default is "grace periods don't auto extend".
OU setting turns on grace period auto extension. By default they only do so
when the grace period ends on a closed date, but there are two modifiers to
change that.
The first modifier causes grace periods to extend for all closed dates that
they intersect. This is "grace periods are only consumed by open days."
The second modifier causes a grace period that ends just before a closed
day, with or without extension having happened, to include the closed day
(and any following it) as well. This is mainly so that a backdate into the
closed period following the grace period will assume the "best case" of the
item having been returned after hours on the last day of the closed date.
Backdate grace period awareness:
By moving grace period calculations into a shared location backdating can
check the grace period, including extensions. If it finds that the backdate
is within the grace period (before or after extension) then instead of
voiding the fines for after the backdate it instead voids all fines for the
circulation. This emulates what would have happened (no fines) if the item
had been checked in at the time the backdate was made to take effect.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>