LP#1749795 Close circ on adjustment when rebilled user/bshum/lp1749795
authorDan Wells <dbw2@calvin.edu>
Mon, 30 Apr 2018 15:05:11 +0000 (11:05 -0400)
committerBen Shum <ben@evergreener.net>
Wed, 2 May 2018 03:30:44 +0000 (22:30 -0500)
commitacf1afb91e1ad8dc588be2f1f140a099e5213847
treefbbd18551a67d544542b2da39800468b9801d0f1
parenta31b83b2f114b966cd6baa979f47f04a68e5a38e
LP#1749795 Close circ on adjustment when rebilled

When doing a re-bill, we were aborting too early when it rebilled to
exactly zero.  Move the 'zero' check to the top of the loop, and
thereby make sure we check if the xact can be closed if we do any
adjustment, up or down.

To test:
- Run new billing test from previous commit, see it fail
- Apply patch
- Run tests again; all should pass

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm