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, 5 Mar 2014 22:21:21 +0000 (17:21 -0500)
commitedea292e878866120f4d419b07cd7a3538d143f1
tree548621fa8e8d7127a08a0225dea189e57579eae4
parentf181e0ff7ed49e2aa86781a6e9818975b325c400
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