View | Details | Raw Unified | Return to bug 28374
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt (-4 / +15 lines)
Lines 1-14 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
5
[% USE Branches %]
6
[% USE Price %]
7
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
8
5
9
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
10
<title>Print receipt</title>
7
<title>Print receipt</title>
11
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
9
10
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon | url %][% ELSE %][% interface | html %]/[% theme | html %]/img/favicon.ico[% END %]" type="image/x-icon" />
12
12
[% Asset.css("css/printreceiptinvoice.css") | $raw %]
13
[% Asset.css("css/printreceiptinvoice.css") | $raw %]
13
[% INCLUDE 'blocking_errors.inc' %]
14
[% INCLUDE 'blocking_errors.inc' %]
14
</head>
15
</head>
Lines 16-22 Link Here
16
<body id="pat_printfeercpt" class="pat">
17
<body id="pat_printfeercpt" class="pat">
17
18
18
<div id="receipt">
19
<div id="receipt">
19
    [% letter.content | $raw | evaltt %]
20
  [% IF slip %]
21
    [% IF plain %]
22
    <pre>
23
      [% slip | html %]
24
    </pre>
25
    [% ELSE %]
26
      [% slip | $raw %]
27
    [% END %]
28
  [% ELSE %]
29
    No print template found
30
  [% END %]
20
</div>
31
</div>
21
32
22
[% MACRO jsinclude BLOCK %]
33
[% MACRO jsinclude BLOCK %]
(-)a/pos/printreceipt.pl (-11 / +20 lines)
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
- 

Return to bug 28374