Bug 18405: Self checkout: Fix broken silent printing
Fix broken 'silent printing' (without printer dialog) in self checkout. To reproduce: Set up silent printing to slip printers as described in: https://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently Verify that it works for check-outs in staff client. Verify that it does not work in Self checkout. To test: Apply patch Verify that silent printing works on SCO Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
e96f39ab52
commit
a0cc3703bf
2 changed files with 19 additions and 7 deletions
10
koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc
Normal file
10
koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc
Normal file
|
@ -0,0 +1,10 @@
|
|||
<script type="text/javascript">
|
||||
[% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %]
|
||||
[% Koha.Preference('IntranetSlipPrinterJS') %]
|
||||
[% ELSE %]
|
||||
$( window ).load(function() {
|
||||
window.print();
|
||||
setTimeout('window.close()', 1);
|
||||
});
|
||||
[% END %]
|
||||
</script>
|
|
@ -1,3 +1,4 @@
|
|||
[% USE Koha %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout › Print Receipt for [% borrowernumber %]</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
@ -6,15 +7,16 @@
|
|||
[% IF stylesheet %]
|
||||
<link rel="stylesheet" type="text/css" href="[% stylesheet %]" />
|
||||
[% END %]
|
||||
<script type="text/javascript">
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
setTimeout('window.close()', 1);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- JavaScript includes -->
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/js/global.js"></script>
|
||||
|
||||
[% INCLUDE 'slip-print.inc' %]
|
||||
|
||||
</head>
|
||||
|
||||
<body id="circ_printslip" class="circ" onload="printThenClose();">
|
||||
<body id="circ_printslip" class="circ">
|
||||
<div id="receipt">
|
||||
[% IF plain %]
|
||||
<pre>
|
||||
|
|
Loading…
Reference in a new issue