David Cook
789c562e18
Currently, slips cannot be printed in circulation, members, or the self check out when using Chrome. This patch adds a timer of 1ms which allows Chrome's custom code to prevent "window.close" occuring before the user has dealt with the print window. This patch also allows admins to use the 'IntranetSlipPrinterJS' system preference to override the slip printing code by centralizing all the slip printing code in slip-print.inc, and including this JS anywhere it's needed in the staff client. I haven't used this include in the OPAC SCO but perhaps it would make sense to do so as well (even if it isn't referred to in the syspref's name). _TEST PLAN_ 1) Using Chrome on Windows (not sure if this is an issue on other OSes), try to print a slip in the following locations: Fines Tab -> Print button koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt: Details tab -> Print button -> Print slip || Print quick slip koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt: Details tab -> Print button -> Print summary koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt: Fines tab -> Accounts tab -> Print (Manual invoice of $5 sundry) koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt: Checkout tab -> Print button koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt: Finish button koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt 2) Note that each time you try to print, a new print page is created but closed before you have a chance to print. 3) Apply the patch 4) Repeat Step 1 5) Note that the print page now doesn't close until after you've chosen to print or cancel. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
72 lines
2.9 KiB
Text
72 lines
2.9 KiB
Text
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Print Receipt for [% cardnumber %]</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
|
|
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
</head>
|
|
<body id="pat_moremember-receipt" class="pat" onload="printThenClose();">
|
|
|
|
<div id="receipt">
|
|
|
|
<h3>[% LibraryName %]</h3>
|
|
[% IF ( branchname ) %][% branchname %]<br />[% END %]
|
|
Checked out to [% firstname %] [% surname %] <br />
|
|
(<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cardnumber %]">[% cardnumber %]</a>)<br />
|
|
|
|
[% todaysdate %]<br />
|
|
|
|
[% IF ( quickslip ) %]
|
|
<h4>Checked out today</h4>
|
|
[% FOREACH issueloo IN issueloop %]
|
|
[% IF ( issueloo.red ) %][% ELSE %]
|
|
[% IF ( issueloo.today ) %]
|
|
<p><a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issueloo.itemnumber %]&biblionumber=[% issueloo.biblionumber %]&bi=[% issueloo.biblioitemnumber %]">[% issueloo.title |html %]</a><br />
|
|
Barcode: [% issueloo.barcode %]<br />
|
|
Date due: [% issueloo.date_due %]<br /></p>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% ELSE %]
|
|
<h4>Checked out</h4>
|
|
[% FOREACH issueloo IN issueloop %]
|
|
[% IF ( issueloo.red ) %][% ELSE %]
|
|
<p><a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issueloo.itemnumber %]&biblionumber=[% issueloo.biblionumber %]&bi=[% issueloo.biblioitemnumber %]">[% issueloo.title |html %]</a><br />
|
|
Barcode: [% issueloo.barcode %]<br />
|
|
Date due: [% issueloo.date_due %]<br /></p>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
[% IF ( quickslip ) %]
|
|
[% ELSE %]
|
|
[% IF ( overdues_exist ) %]
|
|
<h4>Overdues</h4>
|
|
[% FOREACH issueloo IN issueloop %]
|
|
[% IF ( issueloo.red ) %]
|
|
<p><a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issueloo.itemnumber %]&biblionumber=[% issueloo.biblionumber %]&bi=[% issueloo.biblioitemnumber %]">[% issueloo.title |html %]</a><br />
|
|
Barcode: [% issueloo.barcode %]<br />
|
|
Date due: [% issueloo.date_due %]</p>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( koha_news_count ) %]
|
|
<hr><h4 style="text-align: center; font-style:italic;">News</h4>
|
|
<!-- [% koha_news_count %] recent news item(s) -->
|
|
[% FOREACH koha_new IN koha_news %]
|
|
<div class="newsitem" id="news[% koha_new.idnew %]"><h5 style="margin-bottom: 1px; margin-top: 1px"><b>[% koha_new.title %]</b></h5>
|
|
<p style="margin-bottom: 1px; margin-top: 1px">[% koha_new.new %]</p>
|
|
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px"> Posted on [% koha_new.newdate %]
|
|
|
|
</p><hr /></div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|