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

(-)a/misc/cronjobs/overdue_notices.pl (-5 / +4 lines)
Lines 473-486 END_SQL Link Here
473
                my $titles = "";
473
                my $titles = "";
474
                my @items = ();
474
                my @items = ();
475
                
475
                
476
                my $i = 0;
476
                my $j = 0;
477
                my $exceededPrintNoticesMaxLines = 0;
477
                my $exceededPrintNoticesMaxLines = 0;
478
                while ( my $item_info = $sth2->fetchrow_hashref() ) {
478
                while ( my $item_info = $sth2->fetchrow_hashref() ) {
479
                    if ( ( !$email || $nomail ) && $PrintNoticesMaxLines && $i >= $PrintNoticesMaxLines ) {
479
                    if ( ( !$email || $nomail ) && $PrintNoticesMaxLines && $j >= $PrintNoticesMaxLines ) {
480
                      $exceededPrintNoticesMaxLines = 1;
480
                      $exceededPrintNoticesMaxLines = 1;
481
                      last;
481
                      last;
482
                    }
482
                    }
483
                    $i++;
483
                    $j++;
484
                    my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields;
484
                    my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields;
485
                    $titles .= join("\t", @item_info) . "\n";
485
                    $titles .= join("\t", @item_info) . "\n";
486
                    $itemcount++;
486
                    $itemcount++;
Lines 644-650 substituted keys and values. Link Here
644
sub parse_letter {
644
sub parse_letter {
645
    my $params = shift;
645
    my $params = shift;
646
    foreach my $required (qw( letter_code borrowernumber )) {
646
    foreach my $required (qw( letter_code borrowernumber )) {
647
        return unless exists $params->{$required};
647
        return unless ( exists $params->{$required} && $params->{$required} );
648
    }
648
    }
649
649
650
    my $substitute = $params->{'substitute'} || {};
650
    my $substitute = $params->{'substitute'} || {};
651
- 

Return to bug 8267