Bugzilla – Attachment 117248 Details for
Bug 12224
Allow easy printing of patron check-in slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12224: (follow-up) Switching to TT notice
Bug-12224-follow-up-Switching-to-TT-notice.patch (text/plain), 17.09 KB, created by
Martin Renvoize (ashimema)
on 2021-02-24 12:25:33 UTC
(
hide
)
Description:
Bug 12224: (follow-up) Switching to TT notice
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-24 12:25:33 UTC
Size:
17.09 KB
patch
obsolete
>From 3824d23ba68c85b9b9cf8449670fda60ff70c7fc Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >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 <christian.stelzenmueller@bsz-bw.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../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', >-"<h3><<branches.branchname>></h3> >-Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >-(<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >-<<today>><br /> >+[% today %]<br /> > > <h4>Checked in today</h4> >-<checkedin> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] > <p> >-<<biblio.title>> <br /> >-Barcode: <<items.barcode>><br /> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> > </p> >-</checkedin>", >+[% 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: >- - "<h3><<branches.branchname>></h3>" >- - "Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />" >- - "(<<borrowers.cardnumber>>) <br />" >+ - "<h3>[% branch.branchname %]</h3>" >+ - "Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />" >+ - "([% borrower.cardnumber %]) <br />" > - "" >- - "<<today>><br />" >+ - "[% today %]<br />" > - "" > - "<h4>Checked in today</h4>" >- - "<checkedin>" >+ - "[% FOREACH checkin IN old_checkouts %]" >+ - "[% SET item = checkin.item %]" > - "<p>" >- - "<<biblio.title>> <br />" >- - "Barcode: <<items.barcode>><br />" >+ - "[% item.biblio.title %] <br />" >+ - "Barcode: [% item.barcode %] <br />" > - "</p>" >- - "</checkedin>" >+ - "[% 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 <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\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 : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), > ('suggestions','ORDERED','','Suggestion d\'achat commandée',0,'Suggestion d\'achat commandée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\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 : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), > ('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\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 : <<suggestions.reason>>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'), >-('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"<h3><<branches.branchname>></h3> >-Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >-(<<borrowers.cardnumber>>) <br /> >+('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >-<<today>><br /> >+[% today %]<br /> > > <h4>Checked in today</h4> >-<checkedin> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] > <p> >-<<biblio.title>> <br /> >-Barcode: <<items.barcode>><br /> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> > </p> >-</checkedin>", 'print'); >+[% END %]", 'print'); > > INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) > VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% 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', '<h3><<branches.branchname>></h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% END %]", 1, 'print'); > > INSERT INTO letter (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% END %]", 1, 'print'); > > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','UtlÃ¥n','UtlÃ¥n', '<h3><<branches.branchname>></h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% END %]", 1, 'print'); > > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% END %]", 1, 'print'); > > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3> >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','<h3>Su > </ul> > </p>',1, 'email'), > ('circulation','CHECKINSLIP','Checkin slip','Checkin slip', >- "<h3><<branches.branchname>></h3> >- Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >- (<<borrowers.cardnumber>>) <br /> >+"<h3>[% branch.branchname %]</h3> >+Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br /> >+([% borrower.cardnumber %]) <br /> > >- <<today>><br /> >+[% today %]<br /> > >- <h4>Checked in today</h4> >- <checkedin> >- <p> >- <<biblio.title>> <br /> >- Barcode: <<items.barcode>><br /> >- </p> >- </checkedin>",1, 'print'); >+<h4>Checked in today</h4> >+[% FOREACH checkin IN old_checkouts %] >+[% SET item = checkin.item %] >+<p> >+[% item.biblio.title %] <br /> >+Barcode: [% item.barcode %] <br /> >+</p> >+[% 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12224
:
28194
|
29693
|
41819
|
41820
|
44574
|
44576
|
44582
|
44584
|
91476
|
91477
|
91478
|
96970
|
96972
|
110308
|
110395
|
110396
|
110403
|
110404
|
110516
|
110529
|
110530
|
110531
|
110576
|
110577
|
110578
|
114121
|
114122
|
114123
|
114124
|
116135
|
116482
|
116485
|
116486
|
116487
|
116488
|
116489
|
117245
|
117246
|
117247
|
117248
|
117249
|
117250
|
117620
|
117812
|
117813
|
117814
|
117815
|
117816
|
117817
|
117818
|
117819