Bugzilla – Attachment 183128 Details for
Bug 40108
Self-checkout print receipt option not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40108: Fix print receipt option in self-checkout
Bug-40108-Fix-print-receipt-option-in-self-checkou.patch (text/plain), 3.28 KB, created by
Owen Leonard
on 2025-06-10 12:53:00 UTC
(
hide
)
Description:
Bug 40108: Fix print receipt option in self-checkout
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-06-10 12:53:00 UTC
Size:
3.28 KB
patch
obsolete
>From bd9725a1148e3762f3fbdd623ba49dac8212eebb Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 10 Jun 2025 11:58:44 +0000 >Subject: [PATCH] Bug 40108: Fix print receipt option in self-checkout > >The self-checkout logout process, with SelfCheckReceiptPrompt enabled, >asks the user if they want to print a receipt. Because of an error in >time calculation the system always believed the process had timed out >and wouldn't print the receipt. > >Before we implemented a modal dialog to ask for confirmation upon >self-checkout logout, it was necessary to have a timeout function built >into the process. See Bug 11498. > >The modal no longer blocks the page timeout function, so this time >calculation is obsolete and can be removed. > >To test, apply the patch and go to the self-checkout module. > >- Make sure the SelfCheckReceiptPrompt system preference is enabled. >- Log in as a user for doing self-checkout. >- Click the "Finish" button. > - You should see a dialog, "Would you like to print a receipt?" > - Clicking "Print receipt..." should open a new window with your > receipt and log you out of the self-checkout system. > - Clicking "End session" should end your session without triggering a > popup. >- Set the SelfCheckTimeout system preference to something very low, like > 10 seconds. > - Perform the same test as above, but after triggering the dialog wait > 10 seconds for the timeout to trigger. > - The page should reload automatically and log you out. >- Disable the SelfCheckReceiptPrompt system preference. > - Perform the same tests to confirm that clicking the "Finish" button > logs you out immediately without offering to print a slip. > >Sponsored-by: Athens County Public Libraries >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 486b442fcd7..e7a79f45192 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -513,15 +513,14 @@ > $("#logout_form").on("click", function(e){ > e.preventDefault(e); > [% IF Koha.Preference('SelfCheckReceiptPrompt') %] >- var confirmStart = Date.now(); > confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { >- if ( result && (Date.now() - confirmStart) < [% Koha.Preference('SelfCheckTimeout') | html %] ) { >+ if ( result ){ > var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); > location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; > } else { > location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; > } >- }) >+ }); > [% ELSE %] > location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; > [% END %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40108
:
183125
|
183128
|
183139