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>
59 lines
1.7 KiB
Text
59 lines
1.7 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/printreceiptinvoice.css" />
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
</head>
|
|
<body id="pat_printfeercpt" class="pat" onload="printThenClose();">
|
|
|
|
<div id="receipt">
|
|
<!-- The table with the account items -->
|
|
<table>
|
|
[% IF ( LibraryName ) %]
|
|
<tr>
|
|
<th colspan=3 class="centerednames">
|
|
<h3>[% LibraryName %]</h3>
|
|
</th>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th colspan=3 class="centerednames">
|
|
<h2><u>Fee receipt</u></h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan=3 class="centerednames">
|
|
[% IF ( branchname ) %]<h2>[% branchname %]</h2>[% END %]
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan=3 >
|
|
Received with thanks from [% firstname %] [% surname %] <br />
|
|
Card number : [% cardnumber %]<br />
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Description of charges</th>
|
|
<th>Amount</th>
|
|
</tr>
|
|
|
|
[% FOREACH account IN accounts %]
|
|
<tr class="highlight">
|
|
<td>[% account.date %]</td>
|
|
<td>[% account.description %]</td>
|
|
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
|
|
</tr>
|
|
|
|
[% END %]
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2">Total outstanding dues as on date : </td>
|
|
[% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|