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