Bug 40789 - Amount tendered input allows submit on enter which leads to broken modal
Summary: Amount tendered input allows submit on enter which leads to broken modal
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Point of Sale (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-10 17:52 UTC by Jason Robb
Modified: 2025-09-10 17:52 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

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Robb 2025-09-10 17:52:31 UTC
The "Amount tendered" input (#tendered) at pos/pay.pl allows one to submit by hitting the enter key before a Payment type is selected. If the Amount tendered exceeds the Amount being paid, the modal that indicates how much change to give appears. The "Yes" button in the modal does not work and the transaction does not complete because a Payment type has not yet been selected.

The easy solution seems to be to prevent that input from submitting when the enter key is pressed.

To replicate:

1. Enable EnablePointOfSale and Use UseCashRegisters
2. Add a cash register
3. Add an item for purchase
4. Navigate to point of sale, add an item to the sale
5. Enter an amount tendered that exceeds the amount being paid
6. With the Amount tendered input still focused, hit enter. The "Change to give" modal pops up
7. Note the "Yes" button in the modal does not work