@@ -, +, @@
TT filters
---
.../prog/en/includes/members-toolbar.inc | 7 +++--
.../prog/en/modules/tools/letter.tt | 2 +-
members/printslip.pl | 27 ++++++++++---------
tools/letter.pl | 2 +-
4 files changed, 19 insertions(+), 19 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
@@ -32,10 +32,9 @@
Print overdues
[% END %]
Print checkin slip
- [% FOREACH notice IN Notices.GetTemplates( 'patron_slip' ) %]
- Print [% notice.name %] slip
- [% END %]
-
+ [% FOREACH notice IN Notices.GetTemplates( 'patron_slip' ) %]
+ Print [% notice.name | html %] slip
+ [% END %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
@@ -212,7 +212,7 @@
[% CASE 'claimissues' %]Claim serial issue
[% CASE 'reserves' %]Holds
[% CASE 'ill' %]Interlibrary loans
- [% CASE 'members' %]Patrons
+ [% CASE 'members' %]Patrons
[% CASE 'patron_slip' %]Patrons toolbar (slip)
[% CASE 'serial' %]Serials (new issue)
[% CASE 'suggestions' %]Suggestions
--- a/members/printslip.pl
+++ a/members/printslip.pl
@@ -66,13 +66,13 @@ my $patron = Koha::Patrons->find( $borrowernumber );
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
my $branch=C4::Context->userenv->{'branch'};
-my ($letter, $slip, $is_html);
+my ( $letter, $slip, $is_html );
if ( $print eq 'checkinslip' ) {
my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch;
# get today's checkins
my @issue_ids = $patron->old_checkouts->filter_by_todays_checkins->get_column('issue_id');
- my %loops = (
+ my %loops = (
old_issues => \@issue_ids,
);
@@ -89,24 +89,25 @@ if ( $print eq 'checkinslip' ) {
message_transport_type => 'print'
);
-} elsif ( $print eq 'issueslip' ){
- $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 0);
-} elsif ( $print eq 'issueqslip' ){
- $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 1);
+} elsif ( $print eq 'issueslip' ) {
+ $letter = IssueSlip( $session->param('branch') || $branch, $borrowernumber, 0 );
+} elsif ( $print eq 'issueqslip' ) {
+ $letter = IssueSlip( $session->param('branch') || $branch, $borrowernumber, 1 );
} else {
$letter = C4::Letters::GetPreparedLetter(
- module => 'patron_slip',
- letter_code => $print,
- branchcode => $branch,
- lang => $patron->lang,
- tables => {
- branches => $branch,
- borrowers => $borrowernumber
+ module => 'patron_slip',
+ letter_code => $print,
+ branchcode => $branch,
+ lang => $patron->lang,
+ tables => {
+ branches => $branch,
+ borrowers => $borrowernumber
},
message_transport_type => 'print'
);
}
+
$slip = $letter->{content};
$is_html = $letter->{is_html};
--- a/tools/letter.pl
+++ a/tools/letter.pl
@@ -252,7 +252,7 @@ sub add_form {
elsif ($module eq 'claimissues') {
push @{$field_selection}, add_fields('aqbooksellers', 'serial', 'subscription', 'biblio', 'biblioitems');
}
- elsif ($module eq 'patron_slip') {
+ elsif ( $module eq 'patron_slip' ) {
push @{$field_selection}, add_fields('borrowers');
}
elsif ($module eq 'serial') {
--