With bz25597 the SCO print dialog now pops up twice (two separate dialog boxes) when a user clicks "Print receipt and end session". To recreate: 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
What browser are you using and on which OS? I don't think that I've experienced this, but happy to re-test.
Hey David, This only happens to me in FF. Chrome seems to work just fine.
I believe this is because of some duplication of code in sco-main.tt: var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); win.print(); If we use window.open, which opens a print dialog then we do not need to also have win.print()
Created attachment 106941 [details] [review] 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
I've made a note to check this out later.
Created attachment 107860 [details] [review] 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>
Created attachment 108947 [details] [review] 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>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.04
backported to 19.11.x for 19.11.10
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.