fixed logic which determines if a circ is stop-fines or lost
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Sep 2006 14:24:49 +0000 (14:24 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Sep 2006 14:24:49 +0000 (14:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6132 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/src/support-scripts/eg_gen_overdue.pl

index c7990a3..22b9244 100755 (executable)
@@ -90,7 +90,6 @@ sub print_notices {
                        {
                                checkin_time => undef,
                                due_date => { between => [ $start, $end ] },
-                       #       stop_fines => { 'not in' => [ OILS_STOP_FINES_LOST, OILS_STOP_FINES_CLAIMSRETURNED ] }
                        },
                        { order_by => { circ => 'usr, circ_lib' } }
                ];
@@ -159,9 +158,14 @@ sub print_notice {
        my $s1 = scalar(@$circs);
        
        # we don't charge for lost or claimsreturned
-       $circs = [ grep {
-               $_ ne OILS_STOP_FINES_LOST and
-               $_ ne OILS_STOP_FINES_CLAIMSRETURNED } @$circs ];
+       $circs = [ 
+               grep {
+                       !$_->stop_fines or (
+                               $_->stop_fines ne OILS_STOP_FINES_LOST and
+                               $_->stop_fines ne OILS_STOP_FINES_CLAIMSRETURNED 
+                       )
+               } @$circs 
+       ];
 
        return unless @$circs;