|
Lines 66-78
my $patron = Koha::Patrons->find( $borrowernumber );
Link Here
|
| 66 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
66 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
| 67 |
|
67 |
|
| 68 |
my $branch=C4::Context->userenv->{'branch'}; |
68 |
my $branch=C4::Context->userenv->{'branch'}; |
| 69 |
my ($letter, $slip, $is_html); |
69 |
my ( $letter, $slip, $is_html ); |
| 70 |
if ( $print eq 'checkinslip' ) { |
70 |
if ( $print eq 'checkinslip' ) { |
| 71 |
my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; |
71 |
my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; |
| 72 |
|
72 |
|
| 73 |
# get today's checkins |
73 |
# get today's checkins |
| 74 |
my @issue_ids = $patron->old_checkouts->filter_by_todays_checkins->get_column('issue_id'); |
74 |
my @issue_ids = $patron->old_checkouts->filter_by_todays_checkins->get_column('issue_id'); |
| 75 |
my %loops = ( |
75 |
my %loops = ( |
| 76 |
old_issues => \@issue_ids, |
76 |
old_issues => \@issue_ids, |
| 77 |
); |
77 |
); |
| 78 |
|
78 |
|
|
Lines 89-112
if ( $print eq 'checkinslip' ) {
Link Here
|
| 89 |
message_transport_type => 'print' |
89 |
message_transport_type => 'print' |
| 90 |
); |
90 |
); |
| 91 |
|
91 |
|
| 92 |
} elsif ( $print eq 'issueslip' ){ |
92 |
} elsif ( $print eq 'issueslip' ) { |
| 93 |
$letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 0); |
93 |
$letter = IssueSlip( $session->param('branch') || $branch, $borrowernumber, 0 ); |
| 94 |
} elsif ( $print eq 'issueqslip' ){ |
94 |
} elsif ( $print eq 'issueqslip' ) { |
| 95 |
$letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 1); |
95 |
$letter = IssueSlip( $session->param('branch') || $branch, $borrowernumber, 1 ); |
| 96 |
} else { |
96 |
} else { |
| 97 |
$letter = C4::Letters::GetPreparedLetter( |
97 |
$letter = C4::Letters::GetPreparedLetter( |
| 98 |
module => 'patron_slip', |
98 |
module => 'patron_slip', |
| 99 |
letter_code => $print, |
99 |
letter_code => $print, |
| 100 |
branchcode => $branch, |
100 |
branchcode => $branch, |
| 101 |
lang => $patron->lang, |
101 |
lang => $patron->lang, |
| 102 |
tables => { |
102 |
tables => { |
| 103 |
branches => $branch, |
103 |
branches => $branch, |
| 104 |
borrowers => $borrowernumber |
104 |
borrowers => $borrowernumber |
| 105 |
}, |
105 |
}, |
| 106 |
message_transport_type => 'print' |
106 |
message_transport_type => 'print' |
| 107 |
); |
107 |
); |
| 108 |
} |
108 |
} |
| 109 |
|
109 |
|
|
|
110 |
|
| 110 |
$slip = $letter->{content}; |
111 |
$slip = $letter->{content}; |
| 111 |
$is_html = $letter->{is_html}; |
112 |
$is_html = $letter->{is_html}; |
| 112 |
|
113 |
|