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

(-)a/misc/cronjobs/overdue_notices.pl (-12 / +11 lines)
Lines 413-423 END_SQL Link Here
413
                : ($MAX)
413
                : ($MAX)
414
            );                                            # issues being more than maxdays late are managed somewhere else. (borrower probably suspended)
414
            );                                            # issues being more than maxdays late are managed somewhere else. (borrower probably suspended)
415
415
416
            if ( !$overdue_rules->{"letter$i"} ) {
417
                $verbose and warn "No letter$i code for branch '$branchcode'";
418
                next PERIOD;
419
            }
420
421
            # $letter->{'content'} is the text of the mail that is sent.
416
            # $letter->{'content'} is the text of the mail that is sent.
422
            # this text contains fields that are replaced by their value. Those fields must be written between brackets
417
            # this text contains fields that are replaced by their value. Those fields must be written between brackets
423
            # The following fields are available :
418
            # The following fields are available :
Lines 458-463 END_SQL Link Here
458
                    $address1, $address2, $city, $postcode, $country, $email,
453
                    $address1, $address2, $city, $postcode, $country, $email,
459
                    $longest_issue ) = $sth->fetchrow )
454
                    $longest_issue ) = $sth->fetchrow )
460
            {
455
            {
456
                if ( $overdue_rules->{"debarred$i"} ) {
457
458
                    #action taken is debarring
459
                    C4::Members::DebarMember( $borrowernumber, '9999-12-31' );
460
                    $verbose and warn "debarring $borrowernumber $firstname $lastname\n";
461
                }
462
                if ( !$overdue_rules->{"letter$i"} ) {
463
                    $verbose and warn "No letter$i code for branch '$branchcode'";
464
                    next PERIOD;
465
                }
466
                
461
                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i.";
467
                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i.";
462
    
468
    
463
                my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
469
                my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
Lines 470-481 END_SQL Link Here
470
                    next PERIOD;
476
                    next PERIOD;
471
                }
477
                }
472
    
478
    
473
                if ( $overdue_rules->{"debarred$i"} ) {
474
    
475
                    #action taken is debarring
476
                    C4::Members::DebarMember($borrowernumber);
477
                    $verbose and warn "debarring $borrowernumber $firstname $lastname\n";
478
                }
479
                my @params = ($listall ? ( $borrowernumber , 1 , $MAX ) : ( $borrowernumber, $mindays, $maxdays ));
479
                my @params = ($listall ? ( $borrowernumber , 1 , $MAX ) : ( $borrowernumber, $mindays, $maxdays ));
480
                $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays";
480
                $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays";
481
                $sth2->execute(@params);
481
                $sth2->execute(@params);
482
- 

Return to bug 6097