From 30227cbcd35e00b0482f78ef8f8ad8323ef95b0b Mon Sep 17 00:00:00 2001
From: Kyle M Hall
Date: Wed, 2 Dec 2015 17:34:55 +0000
Subject: [PATCH] Bug 15284 - Switch default ISSUESLIP notice to Template
Toolkit
Test Plan:
1) Apply this patch
2) Replace your ISSUESLIP with the following:
[% USE KohaDates %]
[% branch.branchname %]
Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
([% borrower.cardnumber %])
[% today | $KohaDates %]
Checked Out
[% FOREACH checkout IN borrower.checkouts %]
[% IF ! checkout.is_overdue %]
[% checkout.item.biblio.title %]
Barcode: [% checkout.item.barcode %]
Date due: [% checkout.date_due | $KohaDates %]
[% END %]
[% END %]
Overdues
[% FOREACH checkout IN borrower.checkouts %]
[% IF checkout.is_overdue %]
[% checkout.item.biblio.title %]
Barcode: [% checkout.item.barcode %]
Date due: [% checkout.date_due | $KohaDates %]
[% END %]
[% END %]
News
3) Print a slip for a patron, note the data is complete
---
.../mysql/de-DE/mandatory/sample_notices.sql | 72 +++++-----
.../mysql/en/mandatory/sample_notices.sql | 44 +++---
.../mysql/es-ES/mandatory/sample_notices.sql | 44 +++---
.../fr-FR/1-Obligatoire/sample_notices.sql | 51 +++----
.../data/mysql/it-IT/necessari/notices.sql | 74 +++++-----
.../nb-NO/1-Obligatorisk/sample_notices.sql | 127 ++++++------------
.../mysql/pl-PL/mandatory/sample_notices.sql | 44 +++---
.../mysql/ru-RU/mandatory/sample_notices.sql | 47 ++++---
.../mysql/uk-UA/mandatory/sample_notices.sql | 16 +--
9 files changed, 257 insertions(+), 262 deletions(-)
diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql
index d710bd6272..9a25dd78da 100644
--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql
+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql
@@ -56,39 +56,47 @@ VALUES ('members', 'DISCHARGE', 'Entlastung', 'Entlastung für <', 1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', 'Ausleihquittung
-Ausgeliehen an: <> <> <> <>
-(<>)
+VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
+
+[% today | $KohaDates %]
+
+Checked Out
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
-<>
-
-Ausleihen
-
-
-<>
-Signatur: <>
-Barcode: <>
-Fällig am: <>
-
-
-
-Überfällig
-
-
-<>
-Signatur: <>
-Barcode: <>
-Fällig am: <>
-
-
-
-
-', 1),
+Overdues
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
+
+
+
+News
+
+
+
+', 1),
('circulation','ISSUEQSLIP','Kurzquittung','Kurzquittung', 'Ausleihquittung
Bibliothek: <>
Ausleihe an: <> <>
diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql
index 210353064f..cc9a94e441 100644
--- a/installer/data/mysql/en/mandatory/sample_notices.sql
+++ b/installer/data/mysql/en/mandatory/sample_notices.sql
@@ -56,29 +56,34 @@ VALUES ('members', 'DISCHARGE', 'Discharge confirmation', 'Discharge for <', 1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<>
-Checked out to <> <> <> <>
-(<>)
+VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today | $KohaDates %]
Checked Out
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
Overdues
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
@@ -90,7 +95,8 @@ Date due: <>
-', 1),
+
+', 1),
('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '[%- USE KohaDates -%]
[% branch.branchname %]
Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %]
diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql
index 965850ac91..55fe4530ec 100644
--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql
+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql
@@ -48,29 +48,34 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','Su
',1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<>
-Checked out to <> <> <> <>
-(<>)
+VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today | $KohaDates %]
Checked Out
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
Overdues
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
@@ -82,7 +87,8 @@ Date due: <>
-', 1),
+
+', 1),
('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<>
Checked out to <> <> <> <>
(<>)
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
index b3dfec24e5..a506f0f30f 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
@@ -50,33 +50,38 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','Su
',1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<>
-Prêts à <> <> <> <>
-(<>)
-
-<>
-
-Emprunts
-
-
-<>
-Code à barres : <>
-Retour le : <>
-
-
+VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
+
+[% today | $KohaDates %]
+
+Checked Out
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
-Retards
-
-
-<>
-Codes à barres : <>
-Retour le : <>
-
-
+Overdues
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
-Nouvelles
+News
<>
diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql
index adde2c45fb..68952d8a40 100644
--- a/installer/data/mysql/it-IT/necessari/notices.sql
+++ b/installer/data/mysql/it-IT/necessari/notices.sql
@@ -55,41 +55,47 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','
Su
',1, 'email');
INSERT INTO letter (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<>
-Prestito a <> <> <> <>
-(<>)
-
-<>
-
-Prestito
-
-
-<>
-Codice a barre: <>
-Data di scadenza: <>
-
-
+VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
+
+[% today | $KohaDates %]
+
+Checked Out
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
-Ritardi
-
-
-<>
-Codice a barre: <>
-Data di scadenza: <>
-
-
-
-
-
-Novità
-
-
-', 1),
+Overdues
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
+
+
+
+News
+
+
+
+', 1),
('circulation','ISSUEQSLIP','Ricevuta (sintetica)','Ricevuta (sintetica)', '<>
Prestato/i a <> <> <> <>
(<>)
diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql
index 794c797b0a..7253e70f85 100644
--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql
+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql
@@ -71,94 +71,47 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','Su
',1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<>
-Utlånt til <> <> <> <>
-(<>)
-
-<>
-
-Utlånt
-
-
-<>
-Strekkode: <>
-Innleveringsfrist: <>
-
-
-
-Forfalte lån
-
-
-<>
-Strekkode: <>
-Innleveringsfrist: <>
-
-
-
-
-
-Nyheter
-
-
-', 1),
-('circulation','ISSUEQSLIP','Utlån (enkel)','Utlån (enkel)', '<>
-Utlånt til <> <> <> <>
-(<>)
-
-<>
-
-Utlånt i dag
-
-
-<>
-Strekkode: <>
-Innleveringsfrist: <>
-
-', 1),
-('circulation','HOLD_SLIP','Reservasjon','Reservasjon', 'Dato: <>
-
- Overfør til/Reservasjon hos <>
-
-<>, <>
-
-
- - <>
- - <>
- - <>
- <>
- <> <>
-
- - <>
-
-
-RESERVERT
-<>
-<>
-
-Kommentarer:
-
<>
-
-', 1),
-('circulation','TRANSFERSLIP','Overføringslapp','Overføringslapp', 'Dato: <>
-
-Overføres til <>
+VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
+
+[% today | $KohaDates %]
+
+Checked Out
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
-EKSEMPLAR
-<>
-<>
-', 1);
+Overdues
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
+
+
+
+News
+
+
+
+', 1),
INSERT INTO `letter` (`module`,`code`,`branchcode`,`name`,`is_html`,`title`,`content`)
VALUES (
diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql
index 115a6adc28..16f6778110 100644
--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql
+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql
@@ -49,29 +49,34 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','Su
',1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<>
-Checked out to <> <> <> <>
-(<>)
+VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today | $KohaDates %]
Checked Out
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
Overdues
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
@@ -83,7 +88,8 @@ Date due: <>
-', 1),
+
+', 1),
('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<>
Checked out to <> <> <> <>
(<>)
diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql
index a979698dd1..5b53ffad4a 100644
--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql
+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql
@@ -48,29 +48,34 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','Su
',1, 'email');
INSERT INTO `letter` (module, code, name, title, content, is_html)
-VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<>
-Checked out to <> <> <> <>
-(<>)
+VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '[% USE KohaDates %]
+[% branch.branchname %]
+Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today | $KohaDates %]
Checked Out
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF ! checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
Overdues
-
-
-<>
-Barcode: <>
-Date due: <>
-
-
+[% FOREACH checkout IN borrower.checkouts %]
+ [% IF checkout.is_overdue %]
+
+ [% checkout.item.biblio.title %]
+ Barcode: [% checkout.item.barcode %]
+ Date due: [% checkout.date_due | $KohaDates %]
+
+ [% END %]
+[% END %]
@@ -79,11 +84,11 @@ Date due: <>
-', 1),
+
+', 1),
('circulation','ISSUEQSLIP','Issue Quick Slip','Issue Quick Slip', '<>
Checked out to <> <> <> <>
(<>)
diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql
index 63319ad6e7..c63267d4d4 100644
--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql
+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql
@@ -147,14 +147,14 @@ INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES
Новини
-
-',
- 1),
+
+
+', 1),
('circulation','ISSUEQSLIP','швидкий листок про видачу','Швидкий листок про видачу',
'<>
--
2.20.1 (Apple Git-117)