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

(-)a/Koha/Patron.pm (+4 lines)
Lines 2658-2663 sub queue_notice { Link Here
2658
        @message_transports = @{$params->{message_transports}};
2658
        @message_transports = @{$params->{message_transports}};
2659
    }
2659
    }
2660
    return unless defined $letter_code;
2660
    return unless defined $letter_code;
2661
    if ( $params->{expiry_notice_mandatory} ) {
2662
        push( @message_transports, $params->{primary_contact_method} || 'print' ) if scalar(@message_transports) == 0;
2663
    }
2664
2661
    $letter_params->{letter_code} = $letter_code;
2665
    $letter_params->{letter_code} = $letter_code;
2662
    my $print_sent = 0;
2666
    my $print_sent = 0;
2663
    my %return;
2667
    my %return;
(-)a/misc/cronjobs/membership_expiry.pl (-1 / +8 lines)
Lines 244-249 my $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires( Link Here
244
        after  => $after,
244
        after  => $after,
245
    }
245
    }
246
);
246
);
247
my @mandatory_expiry_notice_categories =
248
    map { $_->categorycode } Koha::Patron::Categories->search( { 'me.enforce_expiry_notice' => 1 } )->as_list;
247
249
248
my $where_literal = join ' AND ', @where;
250
my $where_literal = join ' AND ', @where;
249
$upcoming_mem_expires = $upcoming_mem_expires->search( \$where_literal ) if @where;
251
$upcoming_mem_expires = $upcoming_mem_expires->search( \$where_literal ) if @where;
Lines 290-295 while ( my $expiring_patron = $upcoming_mem_expires->next ) { Link Here
290
        message_name => 'Patron_Expiry',
292
        message_name => 'Patron_Expiry',
291
    };
293
    };
292
294
295
    my $is_notice_mandatory = grep( $expiring_patron->categorycode, @mandatory_expiry_notice_categories );
296
    if ($is_notice_mandatory) {
297
        $sending_params->{expiry_notice_mandatory} = 1;
298
        $sending_params->{primary_contact_method}  = $expiring_patron->primary_contact_method;
299
    }
300
293
    my $result = $expiring_patron->queue_notice($sending_params);
301
    my $result = $expiring_patron->queue_notice($sending_params);
294
    $count_enqueued++ if $result->{sent};
302
    $count_enqueued++ if $result->{sent};
295
}
303
}
296
- 

Return to bug 30301