@@ -, +, @@ --- .../mysql/atomicupdate/auto_renewals_notice.perl | 33 ++++++++++++++++++++++ .../data/mysql/de-DE/mandatory/sample_notices.sql | 21 ++++++++++++++ .../data/mysql/en/mandatory/sample_notices.sql | 21 ++++++++++++++ .../data/mysql/es-ES/mandatory/sample_notices.sql | 21 ++++++++++++++ .../mysql/fr-CA/obligatoire/sample_notices.sql | 21 ++++++++++++++ .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 21 ++++++++++++++ installer/data/mysql/it-IT/necessari/notices.sql | 21 ++++++++++++++ .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 21 ++++++++++++++ .../data/mysql/pl-PL/mandatory/sample_notices.sql | 21 ++++++++++++++ .../data/mysql/ru-RU/mandatory/sample_notices.sql | 21 ++++++++++++++ .../data/mysql/uk-UA/mandatory/sample_notices.sql | 21 ++++++++++++++ 11 files changed, 243 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/auto_renewals_notice.perl --- a/installer/data/mysql/atomicupdate/auto_renewals_notice.perl +++ a/installer/data/mysql/atomicupdate/auto_renewals_notice.perl @@ -0,0 +1,33 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + $dbh->do( "INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email');" ); + + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23787 - Add AUTO_RENEWALS in sample_notices.sql)\n"; +} --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ a/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -384,3 +384,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ a/installer/data/mysql/en/mandatory/sample_notices.sql @@ -382,3 +382,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ a/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -376,3 +376,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -264,3 +264,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -377,3 +377,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ a/installer/data/mysql/it-IT/necessari/notices.sql @@ -380,3 +380,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -396,3 +396,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -374,3 +374,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -376,3 +376,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -465,3 +465,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', 'print', 'default'); + +INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'Notification of automatic renewal', 'Automatic renewal notice', +"Dear [% borrower.firstname %] [% borrower.surname %], +[% IF checkout.auto_renew_error %] +The following item, [% biblio.title %], has not been renewed because: +[% IF checkout.auto_renew_error == 'too_many' %] +You have reached the maximum of checkouts possible. +[% ELSIF checkout.auto_renew_error == 'on_reserve' %] +This item is on hold for another patron. +[% ELSIF checkout.auto_renew_error == 'restriction' %] +You are currently restricted. +[% ELSIF checkout.auto_renew_error == 'overdue' %] +You have overdue items. +[% ELSIF checkout.auto_renew_error == 'auto_too_late' %] +It\'s too late to renew this item. +[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %] +Your total unpaid fines are too high. +[% END %] +[% ELSE %] +The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due %] +[% END %]", 'email'); --