LP 1198465: Refactor logic into gatekeeper functions
authorDan Wells <dbw2@calvin.edu>
Wed, 26 Feb 2014 16:12:21 +0000 (11:12 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 28 Jul 2015 20:24:44 +0000 (16:24 -0400)
commit7d8686135e65942b3a474e9bff6925f026a2023b
tree5923a6c6b195c3c1f2086f8af92e9d3289ec31e8
parentb6d4f96caa22923f84124e825427407489e821a0
LP 1198465: Refactor logic into gatekeeper functions

The bulk of this commits take the logic from adjust_bills_to_zero() and
moves it up a layer into the "gatekeeper" void_or_zero* functions.
This move also allows us to simplify the logic, since some facts are
already known based on our function path.

Also:
- give void_or_zero_overdues() a new signature to better support
  multiple options
- add new 'force_void' and 'force_zero' options to this function
- rename real_void_bills() to simply void_bills() (since there is no
  other void_bills(), the "real" was redundant)

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm