From e1fdcd3a6885baac3f86402e330aef3d8b36c681 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 25 Sep 2014 12:58:45 -0400 Subject: [PATCH] LP#1198465 Allow fine generator to respect a stop_fines filter In order to support situations where billings should be generated on specific circs, even when stop_fines is set, we allow a filter to be passed. The default of not passing a filter is the same as requiring that stop_fines be NULL, which is the pre-commit behavior. We also remove a never-used parameter. Signed-off-by: Mike Rylander Signed-off-by: Dan Wells --- .../lib/OpenILS/Application/Storage/Publisher/action.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 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 0452676b6a..62713bdab3 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 $overbill = shift; + my $stop_fines_reasons = shift; local $OpenILS::Application::Storage::WRITE = 1; my @circs; if ($circ) { push @circs, - action::circulation->search_where( { id => $circ, stop_fines => undef } ), + action::circulation->search_where( { id => $circ, stop_fines => $stop_fines_reasons } ), booking::reservation->search_where( { id => $circ, return_time => undef, cancel_time => undef } ); } else { push @circs, overdue_circs(); @@ -1132,10 +1132,6 @@ 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.43.2