Bug 25791: Remove win.print()

Test plan:
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Click 'Print receipt and end session'
5) Notice two print dialog boxes right on top of each other
6) Apply patch
7) Repeat steps 1 - 4
8) Should only get a single print dialog.
9) Test in FF/Chrome and make sure behavior is consistent

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Lucas Gass 2020-07-15 22:28:07 +00:00 committed by Jonathan Druart
parent 49f5200374
commit 6797f07bbd

View file

@ -481,7 +481,6 @@
confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) {
if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&amp;print=qslip");
win.print();
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
} else {
location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';