LP#1193204 Fixes error with generate_fines
authorLiam Whalen <whalen.ld@gmail.com>
Mon, 15 Jul 2013 04:30:13 +0000 (21:30 -0700)
committerDan Scott <dscott@laurentian.ca>
Mon, 15 Jul 2013 13:23:48 +0000 (09:23 -0400)
commita8104c59697bdf36cf3ca7d917625b2160307393
treeecc9ac2a96fa70f29c6956852a7f83b055bbe639
parentc1e878888998f2a9dd4e588ed3e92f2c505eb7f3
LP#1193204 Fixes error with generate_fines

If an overdue is returned after a closed date, the generate_fines code
will not generate fines for those items because the section of code that
checks for closed dates returns from the function if a closed date is
encountered.

For example, if an item is due on June 29th, but is not returned until
after July 1st (Canada Day), then when fines are generated for the item,
generate_fines creates a fine for the 30th of June, but when it
gets to the 1st of July it encouters a closed date and executes a
'return' statement which exits the generate_fines code causing the
fine from June 30th to be rolled back as well as preventing further
fines from being created.

This fix replaces the 'return' statements inside the 'for' loop
that is nested within the eval with 'next' statements.

Signed-off-by: Liam Whalen <whalen.ld@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm