|
Line 0
Link Here
|
| 0 |
- |
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 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 |
} |