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

(-)a/misc/cronjobs/automatic_renewals.pl (-3 / +8 lines)
Lines 282-295 sub send_digests { Link Here
282
        next PATRON unless $borrower_preferences; # how could this happen?
282
        next PATRON unless $borrower_preferences; # how could this happen?
283
283
284
        my $patron = Koha::Patrons->find( $borrowernumber );
284
        my $patron = Koha::Patrons->find( $borrowernumber );
285
        my $library = Koha::Libraries->find( $params->{branchcode} );
285
        my $branchcode;
286
        if ( defined $params->{branchcode} ) {
287
            $branchcode = $params->{branchcode};
288
        } else {
289
            $branchcode = $patron->branchcode;
290
        }
291
        my $library = Koha::Libraries->find( $branchcode );
286
        my $from_address = $library->from_email_address;
292
        my $from_address = $library->from_email_address;
287
293
288
        foreach my $transport ( keys %{ $borrower_preferences->{'transports'} } ) {
294
        foreach my $transport ( keys %{ $borrower_preferences->{'transports'} } ) {
289
            my $letter = C4::Letters::GetPreparedLetter (
295
            my $letter = C4::Letters::GetPreparedLetter (
290
                module => 'circulation',
296
                module => 'circulation',
291
                letter_code => $params->{letter_code},
297
                letter_code => $params->{letter_code},
292
                branchcode => $params->{branchcode},
298
                branchcode => $branchcode,
293
                lang => $patron->lang,
299
                lang => $patron->lang,
294
                substitute => {
300
                substitute => {
295
                    error => $digest->{error}||0,
301
                    error => $digest->{error}||0,
296
- 

Return to bug 29223