LP 1198465: Refactor logic into gatekeeper functions
authorDan Wells <dbw2@calvin.edu>
Wed, 26 Feb 2014 16:12:21 +0000 (11:12 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 15 Apr 2015 14:34:36 +0000 (10:34 -0400)
commitdc41355a7000407365350f1719c723ebc38c714d
treea46f15458afc2a81786adec123e3e0f6303c058d
parent62e40f0ab102d8414a2d5c9186d03cb9bb481a56
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>
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