From 3824d23ba68c85b9b9cf8449670fda60ff70c7fc Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 3 Dec 2020 11:04:23 +1300 Subject: [PATCH] Bug 12224: (follow-up) Switching to TT notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Stelzenmüller Signed-off-by: Martin Renvoize --- .../bug_12224-add_CHECKINSLIP_notice.perl | 17 +++++++------- .../mysql/en/mandatory/sample_notices.yml | 17 +++++++------- .../fr-CA/obligatoire/sample_notices.sql | 17 +++++++------- .../fr-FR/1-Obligatoire/sample_notices.sql | 23 ++++++++++--------- .../data/mysql/it-IT/necessari/notices.sql | 23 ++++++++++--------- .../nb-NO/1-Obligatorisk/sample_notices.sql | 23 ++++++++++--------- .../mysql/pl-PL/mandatory/sample_notices.sql | 23 ++++++++++--------- .../mysql/ru-RU/mandatory/sample_notices.sql | 23 ++++++++++--------- .../mysql/uk-UA/mandatory/sample_notices.sql | 23 ++++++++++--------- members/printslip.pl | 15 ++++-------- 10 files changed, 103 insertions(+), 101 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl b/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl index fc33a72771..6edfbc9877 100644 --- a/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl +++ b/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl @@ -2,19 +2,20 @@ $DBversion = 'XXX'; if( CheckVersion( $DBversion ) ) { $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES ('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip', -"

<>

-Checked in items for <> <> <> <>
-(<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today %]

Checked in today

- +[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %]

-<>
-Barcode: <>
+[% item.biblio.title %]
+Barcode: [% item.barcode %]

-
", +[% END %]", 'print') }); diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 9d4f02ecb0..52d68c6f70 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1464,16 +1464,17 @@ tables: message_transport_type: print lang: default content: - - "

<>

" - - "Checked in items for <> <> <> <>
" - - "(<>)
" + - "

[% branch.branchname %]

" + - "Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
" + - "([% borrower.cardnumber %])
" - "" - - "<>
" + - "[% today %]
" - "" - "

Checked in today

" - - "" + - "[% FOREACH checkin IN old_checkouts %]" + - "[% SET item = checkin.item %]" - "

" - - "<>
" - - "Barcode: <>
" + - "[% item.biblio.title %]
" + - "Barcode: [% item.barcode %]
" - "

" - - "
" + - "[% END %]" diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql index d8d4f40410..44bfec61e9 100644 --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -23,19 +23,20 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m ('suggestions','AVAILABLE','','Suggestion d\'achat disponible',0,'Suggestion d\'achat disponible','Bonjour <> <>,\r\n\r\nVous nous avez suggéré l\'achat du document <> par <>.\r\n\r\nNous avons le plaisir de vous informer que le document fait aujourd\'hui partie de nos collection et qu\'il est disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <>.\r\n\r\nMerci.\r\n\r\n<>','email'), ('suggestions','ORDERED','','Suggestion d\'achat commandée',0,'Suggestion d\'achat commandée','Bonjour <> <>,\r\n\r\nVous nous avez suggéré l\'achat du document <> par <>.\r\n\r\nNous avons le plaisir de vous informer que le document a été commandé.\r\n\r\nVous recevrez une nouvelle notification quand le document sera disponible à bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <>.\r\n\r\nMerci.\r\n\r\n<>','email'), ('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <> <>,\r\n\r\nVous nous avez suggéré l\'achat du document <> par <>.\r\n\r\nNous avons évalué votre suggestion aujourd\'hui et décidé de ne pas l\'acheter cette fois.\r\n\r\nLa raison de notre refus est : <>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <>.\r\n\r\nMerci.\r\n\r\n<>','email'), -('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"

<>

-Checked in items for <> <> <> <>
-(<>)
+('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
-<>
+[% today %]

Checked in today

- +[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %]

-<>
-Barcode: <>
+[% item.biblio.title %]
+Barcode: [% item.barcode %]

-
", 'print'); +[% END %]", 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','

Suggestion en attente

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 5e1b68ceec..1eac37924e 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -52,19 +52,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '

<>

diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 2deffe4af3..681f5f7d34 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -57,19 +57,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO letter (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '

<>

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 1e0563771b..9ae18e92ae 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -72,19 +72,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '

<>

diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index e320733373..21de6f284f 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -51,19 +51,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '

<>

diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 8341257064..52f7fdb4c0 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -50,19 +50,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '

<>

diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 857a1a94b8..713810d81c 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -115,19 +115,20 @@ VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','

Su

',1, 'email'), ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', - "

<>

- Checked in items for <> <> <> <>
- (<>)
+"

[% branch.branchname %]

+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
+([% borrower.cardnumber %])
- <>
+[% today %]
-

Checked in today

- -

- <>
- Barcode: <>
-

-
",1, 'print'); +

Checked in today

+[% FOREACH checkin IN old_checkouts %] +[% SET item = checkin.item %] +

+[% item.biblio.title %]
+Barcode: [% item.barcode %]
+

+[% END %]", 1, 'print'); INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'DISCHARGE', 'підтвердження на розрахування', diff --git a/members/printslip.pl b/members/printslip.pl index 389f5a6c88..6d04ed8649 100755 --- a/members/printslip.pl +++ b/members/printslip.pl @@ -88,7 +88,7 @@ if ( $print eq 'checkinslip' ) { my $today_end = dt_from_string->set( hour => 23, minute => 59, second => 0 ); $today_start = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_start ); $today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end ); - my $todays_checkins = Koha::Old::Checkouts->search({ + my @todays_checkins = Koha::Old::Checkouts->search({ returndate => { '>=' => $today_start, '<=' => $today_end, @@ -97,15 +97,8 @@ if ( $print eq 'checkinslip' ) { branchcode => $checkinslip_branch, }); - my @checkins; - while ( my $c = $todays_checkins->next ) { - push @checkins, { - biblio => $c->item->biblio->unblessed, - items => $c->item->unblessed, - }; - } - my %repeat = ( - checkedin => \@checkins, + my %loops = ( + old_issues => [ map { $_->issue_id } @todays_checkins ], ); my $letter = C4::Letters::GetPreparedLetter( @@ -116,7 +109,7 @@ if ( $print eq 'checkinslip' ) { branches => $checkinslip_branch, borrowers => $borrowernumber, }, - repeat => \%repeat, + loops => \%loops, message_transport_type => 'print' ); -- 2.20.1