Grace period auto extension and backdate awareness user/tsbere/grace_period_extend
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 15 Sep 2011 16:10:12 +0000 (12:10 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 6 Oct 2011 23:12:08 +0000 (19:12 -0400)
commit28b84267a5b3df29ae95043cea4f371ba100e98a
tree5488a618f3ce420924c54ec225024217b0011b7d
parent004d23837442fc5410ecf823342d4837f0f8c69b
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.grace_period_extend.sql [new file with mode: 0644]