From 67ca0f2a5077439b9e43f227ca3242c980bdb337 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 7 Sep 2006 17:11:09 +0000 Subject: [PATCH 1/1] adjusting backdate so it does not clear fines for "today" (the backdate day); fine generator will now create bills for "today" git-svn-id: svn://svn.open-ils.org/ILS/trunk@6018 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 4 ++-- .../perlmods/OpenILS/Application/Storage/Publisher/action.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 25af8fabb6..f8402d3d1e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -1516,7 +1516,7 @@ sub checkin_handle_backdate { my $bills = $self->editor->search_money_billing( { - billing_ts => { '>=' => $self->backdate }, + billing_ts => { '>=' => $self->backdate . 'T23:59:59' }, xact => $self->circ->id, billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS } @@ -1542,7 +1542,7 @@ sub _checkin_handle_backdate { my $bills = $session->request( "open-ils.storage.direct.money.billing.search_where.atomic", - billing_ts => { '>=' => $backdate }, + billing_ts => { '>=' => $backdate . 'T23:59:59' }, xact => $circ->id, billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS )->gather(1); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index a058feee41..c55e72c052 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -543,8 +543,8 @@ sub generate_fines { #$last_fine += $fine_interval * $grace; } - my $pending_fine_count = int( ($now - $last_fine) / $fine_interval ) - 1; - if ($pending_fine_count < 1) { + my $pending_fine_count = int( ($now - $last_fine) / $fine_interval ); + if ($pending_fine_count < 1 + $grace) { $client->respond( "\tNo fines to create. " ); if ($grace && $now < $due + $fine_interval * $grace) { $client->respond( "Still inside grace period of: ". seconds_to_interval( $fine_interval * $grace)."\n" ); -- 2.43.2