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

(-)a/installer/data/mysql/atomicupdate/bug-18532.perl (-4 / +11 lines)
Lines 4-14 if( CheckVersion( $DBversion ) ) { Link Here
4
    $dbh->do( qq{
4
    $dbh->do( qq{
5
        INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS_DGST', 'notification on auto renewing', 'Auto renewals (Digest)',
5
        INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS_DGST', 'notification on auto renewing', 'Auto renewals (Digest)',
6
        "Dear [% borrower.firstname %] [% borrower.surname %],
6
        "Dear [% borrower.firstname %] [% borrower.surname %],
7
        [% IF checkout.auto_renew_errors %]
7
        [% IF error %]
8
        There were [% checkout.auto_renew_errors %] items that where not correctly renewed.
8
            There were [% error %] items that were not correctly renewed.
9
        [% END %]
9
        [% END %]
10
        [% IF checkout.auto_renew %]
10
        [% IF success %]
11
        There were [% checkout.auto_renew %] items that where correctly renewed.
11
            There were [% success %] items that where correctly renewed.
12
        [% END %]
13
        [% FOREACH issue IN issues %]
14
            [% issue.item.biblio.title %] : [% issue.item.barcode %]
15
            [% IF issue.auto_renew_error IS NULL %]
16
                was renewed until [% issue.date_due %]
17
            [% ELSE %]
18
                was not renewed with error: [% issue.auto_renew_error %]
12
        [% END %]
19
        [% END %]
13
        ", 'email');
20
        ", 'email');
14
    });
21
    });
(-)a/misc/cronjobs/automatic_renewals.pl (-1 / +3 lines)
Lines 181-189 while ( my $auto_renew = $auto_renews->next ) { Link Here
181
        if ($digest_per_branch) {
181
        if ($digest_per_branch) {
182
            $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{success}++ if $error eq 'auto_renew';
182
            $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{success}++ if $error eq 'auto_renew';
183
            $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error == 'auto_too_soon' ;
183
            $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error == 'auto_too_soon' ;
184
            push @{$renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{issues}} $auto_renew->issue_id;
184
        } else {
185
        } else {
185
            $renew_digest->{ $auto_renew->borrowernumber }->{success} ++ if $error eq 'auto_renew';
186
            $renew_digest->{ $auto_renew->borrowernumber }->{success} ++ if $error eq 'auto_renew';
186
            $renew_digest->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error eq 'auto_too_soon' ;
187
            $renew_digest->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error eq 'auto_too_soon' ;
188
            push @{$renew_digest->{ $auto_renew->borrowernumber }->{issues}} $auto_renew->issue_id;
187
        }
189
        }
188
    }
190
    }
189
191
Lines 292-297 sub send_digests { Link Here
292
                    error => $digest->{error}||0,
294
                    error => $digest->{error}||0,
293
                    success => $digest->{success}||0,
295
                    success => $digest->{success}||0,
294
                },
296
                },
297
                loops => { issues => \@{$digest->{issues} },
295
                tables      => {
298
                tables      => {
296
                    borrowers => $patron->borrowernumber,
299
                    borrowers => $patron->borrowernumber,
297
                },
300
                },
298
- 

Return to bug 18532