Bug 12224: (follow-up) Switching to TT notice

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Aleisha Amohia 2020-12-03 11:04:23 +13:00 committed by Jonathan Druart
parent 4bf59acce6
commit 28b90b684e
10 changed files with 103 additions and 101 deletions

View File

@ -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')
});

View File

@ -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 %]"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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', 'підтвердження на розрахування',

View File

@ -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'
);