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>
Fri, 20 Feb 2015 23:51:00 +0000 (18:51 -0500)
commitf7077977620ca0079c34277530cba2ad2e584504
treec53c45adddcfb9bfc5a58f3a1a6eb5667a4dfeb9
parent913ac8b70b6ba45c7aaef6b83672ffe3daee14b5
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