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 |
- |
|
|