Lines 68-82
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log
Link Here
|
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 = |
|
|
72 |
$session->param('branch') ? $session->param('branch') : $branch; |
72 |
|
73 |
|
73 |
# get today's checkins |
74 |
# get today's checkins |
74 |
my @issue_ids = $patron->old_checkouts->search( { branchcode => $checkinslip_branch } ) |
75 |
my @issue_ids = |
|
|
76 |
$patron->old_checkouts->search( { branchcode => $checkinslip_branch } ) |
75 |
->filter_by_todays_checkins->get_column('issue_id'); |
77 |
->filter_by_todays_checkins->get_column('issue_id'); |
76 |
|
78 |
|
77 |
my %loops = ( |
79 |
my %loops = ( old_issues => \@issue_ids, ); |
78 |
old_issues => \@issue_ids, |
|
|
79 |
); |
80 |
|
80 |
|
81 |
$letter = C4::Letters::GetPreparedLetter( |
81 |
$letter = C4::Letters::GetPreparedLetter( |
82 |
module => 'circulation', |
82 |
module => 'circulation', |
Lines 91-114
if ( $print eq 'checkinslip' ) {
Link Here
|
91 |
message_transport_type => 'print' |
91 |
message_transport_type => 'print' |
92 |
); |
92 |
); |
93 |
|
93 |
|
94 |
} elsif ( $print eq 'issueslip' ){ |
94 |
} |
95 |
$letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 0); |
95 |
elsif ( $print eq 'issueslip' ) { |
96 |
} elsif ( $print eq 'issueqslip' ){ |
96 |
$letter = |
97 |
$letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 1); |
97 |
IssueSlip( $session->param('branch') || $branch, $borrowernumber, 0 ); |
98 |
} else { |
98 |
} |
|
|
99 |
elsif ( $print eq 'issueqslip' ) { |
100 |
$letter = |
101 |
IssueSlip( $session->param('branch') || $branch, $borrowernumber, 1 ); |
102 |
} |
103 |
else { |
99 |
$letter = C4::Letters::GetPreparedLetter( |
104 |
$letter = C4::Letters::GetPreparedLetter( |
100 |
module => 'patron_slip', |
105 |
module => 'patron_slip', |
101 |
letter_code => $print, |
106 |
letter_code => $print, |
102 |
branchcode => $branch, |
107 |
branchcode => $branch, |
103 |
lang => $patron->lang, |
108 |
lang => $patron->lang, |
104 |
tables => { |
109 |
tables => { |
105 |
branches => $branch, |
110 |
branches => $branch, |
106 |
borrowers => $borrowernumber |
111 |
borrowers => $borrowernumber |
107 |
}, |
112 |
}, |
108 |
message_transport_type => 'print' |
113 |
message_transport_type => 'print' |
109 |
); |
114 |
); |
110 |
} |
115 |
} |
111 |
|
116 |
|
|
|
117 |
|
112 |
$slip = $letter->{content}; |
118 |
$slip = $letter->{content}; |
113 |
$is_html = $letter->{is_html}; |
119 |
$is_html = $letter->{is_html}; |
114 |
|
120 |
|
115 |
- |
|
|