From e3ec0732cf1474c4ba40960c39b329c70beb7e8d Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Sat, 2 Nov 2019 01:53:06 +0000
Subject: [PATCH] Bug 23787: Add AUTO_RENEWALS to it-IT installer

---
 installer/data/mysql/it-IT/necessari/notices.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql
index adde2c45fb..090271aaa4 100644
--- a/installer/data/mysql/it-IT/necessari/notices.sql
+++ b/installer/data/mysql/it-IT/necessari/notices.sql
@@ -314,3 +314,24 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`,
 
 INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
 ('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent Library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email');
+
+INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS', 'notification on auto renewing', 'Auto renewals',
+"Dear [% borrower.firstname %] [% borrower.surname %],
+[% IF checkout.auto_renew_error %]
+The following item [% biblio.title %] has not been correctly renewed
+[% IF checkout.auto_renew_error == 'too_many' %]
+You have reach 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 overdues.
+[% ELSIF checkout.auto_renew_error == 'auto_too_late' %]
+It\'s too late to renew this checkout.
+[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]
+You have too much unpaid fines.
+[% END %]
+[% ELSE %]
+The following item [% biblio.title %] has correctly been renewed and is now due [% checkout.date_due %]
+[% END %]", 'email');
-- 
2.11.0