[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 38bf1ce296497c31910723205be16c24f95c84dd

Evergreen Git git at git.evergreen-ils.org
Mon Jul 15 09:17:10 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_4 has been updated
       via  38bf1ce296497c31910723205be16c24f95c84dd (commit)
      from  b75e50b76884419714f05ac95f239220e2894d68 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 38bf1ce296497c31910723205be16c24f95c84dd
Author: Liam Whalen <whalen.ld at gmail.com>
Date:   Sun Jul 14 21:30:13 2013 -0700

    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 at gmail.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index 064a4c8..1625360 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -1186,7 +1186,7 @@ sub generate_fines {
 					my $dow_close = "dow_${dow}_close";
 
 					if (my $h = $hoo{$c->$circ_lib_method}) {
-						return if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
+						next if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
 					}
 	
 					my @cl = actor::org_unit::closed_date->search_where(
@@ -1194,7 +1194,7 @@ sub generate_fines {
 							  close_end	=> { '>=' => $timestamptz },
 							  org_unit	=> $c->$circ_lib_method }
 					);
-					return if (@cl);
+					next if (@cl);
 				}
 
 				# The billing amount for this billing normally ought to be the recurring fine amount.

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list