From: Dan Wells Date: Wed, 26 Feb 2014 14:01:44 +0000 (-0500) Subject: LP 1198465: Rename internal functions for clarity X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f181e0ff7ed49e2aa86781a6e9818975b325c400;p=working%2FEvergreen.git LP 1198465: Rename internal functions for clarity These methods will now be the splitting point for void vs. adjustment, so let's give them broader names. Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm index 1cf8cc8bed..4629c1a628 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm @@ -741,7 +741,7 @@ sub set_item_lost_or_lod { # --------------------------------------------------------------------- # void all overdue fines on this circ if configured if( $void_overdue ) { - my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ); + my $evt = OpenILS::Application::Circ::CircCommon->void_or_zero_overdues($e, $circ); return $evt if $evt; } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm index c82a695075..40c6a0127c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm @@ -461,7 +461,7 @@ sub set_circ_claims_returned { # make it look like the circ stopped at the cliams returned time $circ->stop_fines_time($backdate); - my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ, $backdate); + my $evt = OpenILS::Application::Circ::CircCommon->void_or_zero_overdues($e, $circ, $backdate); return $evt if $evt; } @@ -548,7 +548,7 @@ sub post_checkin_backdate_circ_impl { $e->update_action_circulation($circ) or return $e->die_event; # now void the overdues "erased" by the back-dating - my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ, $backdate); + my $evt = OpenILS::Application::Circ::CircCommon->void_or_zero_overdues($e, $circ, $backdate); return $evt if $evt; # If the circ was closed before and the balance owned !=0, re-open the transaction @@ -1263,7 +1263,7 @@ sub handle_mark_damaged { # the assumption is that you would not void the overdues unless you # were also charging for the item and/or applying a processing fee if($void_overdue) { - my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ); + my $evt = OpenILS::Application::Circ::CircCommon->void_or_zero_overdues($e, $circ); return $evt if $evt; } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm index 25bdc0d337..7309e709c5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm @@ -18,12 +18,12 @@ my $U = "OpenILS::Application::AppUtils"; # ----------------------------------------------------------------- -# Voids overdue fines on the given circ. if a backdate is +# Voids (or zeros) overdue fines on the given circ. if a backdate is # provided, then we only void back to the backdate, unless the # backdate is to within the grace period, in which case we void all # overdue fines. # ----------------------------------------------------------------- -sub void_overdues { +sub void_or_zero_overdues { my($class, $e, $circ, $backdate, $note) = @_; my $bill_search = { @@ -69,14 +69,14 @@ sub void_overdues { } # ------------------------------------------------------------------ -# Void all bills of a given type on a circulation. +# Void (or zero) all bills of a given type on a circulation. # # Takes an editor, a circ object, the btype number for the bills you # want to void, and an optional note. # # Returns undef on success or the result from real_void_bills. # ------------------------------------------------------------------ -sub void_bills_of_type { +sub void_or_zero_bills_of_type { my ($class, $e, $circ, $btype, $note) = @_; # Get a bill payment map. diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index 7bb315ee48..f22223cc40 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -2788,7 +2788,7 @@ sub finish_fines_and_voiding { # void overdues after fine generation to prevent concurrent DB access to overdue billings my $note = 'System: Amnesty Checkin' if $self->void_overdues; - my $evt = $CC->void_overdues( + my $evt = $CC->void_or_zero_overdues( $self->editor, $self->circ, $self->backdate, $note); return $self->bail_on_events($evt) if $evt; @@ -3983,7 +3983,7 @@ sub checkin_handle_lost_or_lo_now_found { my $tag = $is_longoverdue ? "LONGOVERDUE" : "LOST"; $logger->debug("voiding $tag item billings"); - my $result = $CC->void_bills_of_type($self->editor, $self->circ, $bill_type, "System: VOIDED FOR $tag ITEM RETURNED"); + my $result = $CC->void_or_zero_bills_of_type($self->editor, $self->circ, $bill_type, "System: VOIDED FOR $tag ITEM RETURNED"); $self->bail_on_events($self->editor->event) if ($result); }