Bug 40108 - Self-checkout print receipt option not working
Summary: Self-checkout print receipt option not working
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 40102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-06-10 11:47 UTC by Owen Leonard
Modified: 2025-06-10 16:04 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40108: Fix print receipt option in self-checkout (3.28 KB, patch)
2025-06-10 12:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40108: Fix print receipt option in self-checkout (3.28 KB, patch)
2025-06-10 12:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40108: Fix print receipt option in self-checkout (3.33 KB, patch)
2025-06-10 15:52 UTC, David Flater
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-06-10 11:47:05 UTC
In self-checkout, if I try to end my session by clicking the "Finish" button I get the "Would you like to print a receipt?" prompt but clicking the "Print receipt and end session" button doesn't trigger a new page with the receipt.
Comment 1 Owen Leonard 2025-06-10 12:44:40 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2025-06-10 12:53:00 UTC Comment hidden (obsolete)
Comment 3 David Flater 2025-06-10 15:52:20 UTC
Created attachment 183139 [details] [review]
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
Signed-off-by: David Flater <flaterdavid@gmail.com>
Comment 4 Owen Leonard 2025-06-10 16:01:09 UTC
*** Bug 40102 has been marked as a duplicate of this bug. ***