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