From b915d4bbf2cef462faa0df1bc6cfe324cdfba477 Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Wed, 19 Nov 2014 18:08:31 -0500 Subject: [PATCH] Revert "LP#1198465 Allow fine generator to respect a stop_fines filter" This reverts commit e1fdcd3a6885baac3f86402e330aef3d8b36c681. The code failed in the case of restoring voided lost overdues together with generating new lost overdues on checkin. Signed-off-by: Dan Wells --- .../perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 62713bdab3..0452676b6a 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 @@ -1042,14 +1042,14 @@ sub generate_fines { my $self = shift; my $client = shift; my $circ = shift; - my $stop_fines_reasons = shift; + my $overbill = shift; local $OpenILS::Application::Storage::WRITE = 1; my @circs; if ($circ) { push @circs, - action::circulation->search_where( { id => $circ, stop_fines => $stop_fines_reasons } ), + action::circulation->search_where( { id => $circ, stop_fines => undef } ), booking::reservation->search_where( { id => $circ, return_time => undef, cancel_time => undef } ); } else { push @circs, overdue_circs(); @@ -1132,6 +1132,10 @@ sub generate_fines { my $f_idx = 0; my $fine = $fines[$f_idx] if (@fines); + if ($overbill) { + $fine = $fines[++$f_idx] while ($fine and $fine->voided); + } + my $current_fine_total = 0; $current_fine_total += int($_->amount * 100) for (grep { $_ and !$_->voided } @fines); -- 2.11.0