adjusting backdate so it does not clear fines for "today" (the backdate day); fine...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Sep 2006 17:11:09 +0000 (17:11 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Sep 2006 17:11:09 +0000 (17:11 +0000)
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
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 25af8fa..f8402d3 100644 (file)
@@ -1516,7 +1516,7 @@ sub checkin_handle_backdate {
 
        my $bills = $self->editor->search_money_billing(
                { 
 
        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
                }
                        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",
 
    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);
                xact => $circ->id,
                billing_type => OILS_BILLING_TYPE_OVERDUE_MATERIALS
        )->gather(1);
index a058fee..c55e72c 100644 (file)
@@ -543,8 +543,8 @@ sub generate_fines {
                                #$last_fine += $fine_interval * $grace;
                        }
        
                                #$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" );
                                $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" );