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

(-)a/installer/data/mysql/atomicupdate/reword_auto_renewals.perl (+35 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
     $dbh->do( q{
5
                     INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice',
6
                             "Dear [% borrower.firstname %] [% borrower.surname %],
7
                             [% IF checkout.auto_renew_error %]
8
                             The following item, [% biblio.title %], has not been renewed because:
9
                             [% IF checkout.auto_renew_error == 'too_many' %]
10
                             You have reached the maximum number of checkouts possible.
11
                             [% ELSIF checkout.auto_renew_error == 'on_reserve' %]
12
                             This item is on hold for another patron.
13
                             [% ELSIF checkout.auto_renew_error == 'restriction' %]
14
                             You are currently restricted.
15
                             [% ELSIF checkout.auto_renew_error == 'overdue' %]
16
                             You have overdue items.
17
                             [% ELSIF checkout.auto_renew_error == 'auto_too_late' %]
18
                             It\'s too late to renew this item.
19
                             [% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]
20
                             Your total unpaid fines are too high.
21
                             [% END %]
22
                             [% ELSE %]
23
                             The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %]
24
                             [% END %]", 'email');
25
                         });
26
27
    # or perform some test and warn
28
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
29
    #    warn "There is something wrong";
30
    # }
31
32
    # Always end with this (adjust the bug info)
33
    SetVersion( $DBversion );
34
    print "Upgrade to $DBversion done (Bug 24378 - Change wording on AUTO_RENEWALS notice in updatedatabase)\n";
35
}
(-)a/installer/data/mysql/updatedatabase.pl (-21 / +20 lines)
Lines 14438-14463 if( CheckVersion( $DBversion ) ) { Link Here
14438
    }
14438
    }
14439
14439
14440
    $dbh->do(q{
14440
    $dbh->do(q{
14441
        INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'notification on auto renewing', 'Auto renewals',
14441
            INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice',
14442
"Dear [% borrower.firstname %] [% borrower.surname %],
14442
        "Dear [% borrower.firstname %] [% borrower.surname %],
14443
[% IF checkout.auto_renew_error %]
14443
        [% IF checkout.auto_renew_error %]
14444
The following item [% biblio.title %] has not been correctly renewed
14444
        The following item, [% biblio.title %], has not been renewed because:
14445
[% IF checkout.auto_renew_error == 'too_many' %]
14445
        [% IF checkout.auto_renew_error == 'too_many' %]
14446
You have reach the maximum of checkouts possible.
14446
        You have reached the maximum number of checkouts possible.
14447
[% ELSIF checkout.auto_renew_error == 'on_reserve' %]
14447
        [% ELSIF checkout.auto_renew_error == 'on_reserve' %]
14448
This item is on hold for another patron.
14448
        This item is on hold for another patron.
14449
[% ELSIF checkout.auto_renew_error == 'restriction' %]
14449
        [% ELSIF checkout.auto_renew_error == 'restriction' %]
14450
You are currently restricted.
14450
        You are currently restricted.
14451
[% ELSIF checkout.auto_renew_error == 'overdue' %]
14451
        [% ELSIF checkout.auto_renew_error == 'overdue' %]
14452
You have overdues.
14452
        You have overdue items.
14453
[% ELSIF checkout.auto_renew_error == 'auto_too_late' %]
14453
        [% ELSIF checkout.auto_renew_error == 'auto_too_late' %]
14454
It\'s too late to renew this checkout.
14454
        It\'s too late to renew this item.
14455
[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]
14455
        [% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]
14456
You have too much unpaid fines.
14456
        Your total unpaid fines are too high.
14457
[% END %]
14457
        [% END %]
14458
[% ELSE %]
14458
        [% ELSE %]
14459
The following item [% biblio.title %] has correctly been renewed and is now due [% checkout.date_due %]
14459
        The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %]
14460
[% END %]", 'email');
14460
        [% END %]", 'email');
14461
    });
14461
    });
14462
14462
14463
    SetVersion( $DBversion );
14463
    SetVersion( $DBversion );
14464
- 

Return to bug 24378