revert to non-aggregate billing, as backdating wipes fines it should not in the case...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 9 Sep 2006 14:46:45 +0000 (14:46 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 9 Sep 2006 14:46:45 +0000 (14:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6034 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index c55e72c..0199d04 100644 (file)
@@ -592,19 +592,20 @@ sub generate_fines {
                                $current_fine_total += $recuring_fine;
                                $latest_amount += $recuring_fine;
                                $latest_billing_ts = $timestamptz;
                                $current_fine_total += $recuring_fine;
                                $latest_amount += $recuring_fine;
                                $latest_billing_ts = $timestamptz;
-       
-                               $client->respond( "\t\tAdding aggregate fine of ".$c->recuring_fine." for period starting ".$$timestamptz."\n" );
-                       }
 
 
-                       money::billing->create(
-                               { xact          => ''.$c->id,
-                                 note          => "System Generated Overdue Fine",
-                                 billing_type  => "Overdue materials",
-                                 amount        => sprintf('%0.2f', $latest_amount/100),
-                                 billing_ts    => $latest_billing_ts,
-                               }
-                       ) if ($latest_billing_ts and $latest_amount);
+                               money::billing->create(
+                                       { xact          => ''.$c->id,
+                                         note          => "System Generated Overdue Fine",
+                                         billing_type  => "Overdue materials",
+                                         amount        => sprintf('%0.2f', $recuring_fine/100),
+                                         billing_ts    => $timestamptz,
+                                       }
+                               );
+
+                       }
 
 
+                       $client->respond( "\t\tAdding fines totaling $latest_amount for overdue up to $latest_billing_ts\n" )
+                               if ($latest_billing_ts and $latest_amount);
 
                        $self->method_lookup('open-ils.storage.transaction.commit')->run;
 
 
                        $self->method_lookup('open-ils.storage.transaction.commit')->run;