Lines 30-38
my $input = CGI->new;
Link Here
|
30 |
|
30 |
|
31 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
31 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
32 |
{ |
32 |
{ |
33 |
template_name => "pos/printreceipt.tt", |
33 |
template_name => "pos/printreceipt.tt", |
34 |
query => $input, |
34 |
query => $input, |
35 |
type => "intranet", |
35 |
type => "intranet", |
36 |
} |
36 |
} |
37 |
); |
37 |
); |
38 |
|
38 |
|
Lines 52-66
output_and_exit_if_error(
Link Here
|
52 |
) if $patron; # Payment could have been anonymous |
52 |
) if $patron; # Payment could have been anonymous |
53 |
|
53 |
|
54 |
my $lang = $patron ? $patron->lang : $template->lang; |
54 |
my $lang = $patron ? $patron->lang : $template->lang; |
55 |
my $letter = C4::Letters::getletter( 'pos', 'RECEIPT', |
55 |
my $letter = C4::Letters::GetPreparedLetter( |
56 |
C4::Context::mybranch, 'print', $lang ); |
56 |
module => 'pos', |
|
|
57 |
letter_code => 'RECEIPT', |
58 |
branchcode => C4::Context::mybranch, |
59 |
message_transport_type => 'print', |
60 |
lang => $lang, |
61 |
tables => { |
62 |
credits => $payment_id, |
63 |
borrowers => $patron ? $patron->borrowernumber : undef |
64 |
}, |
65 |
substitute => { |
66 |
tendered => scalar $input->param('tendered'), |
67 |
change => scalar $input->param('change') |
68 |
} |
69 |
); |
57 |
|
70 |
|
58 |
$template->param( |
71 |
$template->param( |
59 |
letter => $letter, |
72 |
slip => $letter->{content}, |
60 |
payment => $payment, |
73 |
plain => !$letter->{is_html} |
61 |
|
|
|
62 |
tendered => scalar $input->param('tendered'), |
63 |
change => scalar $input->param('change') |
64 |
); |
74 |
); |
65 |
|
75 |
|
66 |
output_html_with_http_headers $input, $cookie, $template->output; |
76 |
output_html_with_http_headers $input, $cookie, $template->output; |
67 |
- |
|
|