View | Details | Raw Unified | Return to bug 6097
Collapse All | Expand All

(-)a/misc/cronjobs/overdue_notices.pl (-10 / +6 lines)
Lines 459-481 END_SQL Link Here
459
                    ) = $sth->fetchrow )
459
                    ) = $sth->fetchrow )
460
            {
460
            {
461
                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i.";
461
                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i.";
462
463
                if ( $overdue_rules->{"debarred$i"} ) {
464
                    #action taken is debarring
465
                    C4::Members::DebarMember($borrowernumber, '9999-12-31');
466
                    $verbose and warn "debarring $borrowernumber $firstname $lastname\n";
467
                }
462
    
468
    
463
                my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
469
                my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
464
470
465
                unless ($letter) {
471
                unless ($letter) {
466
                    $verbose and warn "Message '$overdue_rules->{letter$i}' content not found";
472
                    $verbose and warn "Message '$overdue_rules->{letter$i}' content not found";
467
    
468
                    # might as well skip while PERIOD, no other borrowers are going to work.
469
                    # FIXME : Does this mean a letter must be defined in order to trigger a debar ?
470
                    next PERIOD;
473
                    next PERIOD;
471
                }
474
                }
472
    
475
    
473
                if ( $overdue_rules->{"debarred$i"} ) {
474
    
475
                    #action taken is debarring
476
                    C4::Members::DebarMember($borrowernumber, '9999-12-31');
477
                    $verbose and warn "debarring $borrowernumber $firstname $lastname\n";
478
                }
479
                my @params = ($listall ? ( $borrowernumber , 1 , $MAX ) : ( $borrowernumber, $mindays, $maxdays ));
476
                my @params = ($listall ? ( $borrowernumber , 1 , $MAX ) : ( $borrowernumber, $mindays, $maxdays ));
480
                $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays";
477
                $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays";
481
                $sth2->execute(@params);
478
                $sth2->execute(@params);
482
- 

Return to bug 6097