# ---------------------------------------------------------------------
# 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;
}
# 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;
}
$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
# 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;
}
# -----------------------------------------------------------------
-# 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 = {
}
# ------------------------------------------------------------------
-# 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.
# 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;
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);
}