Bug 40789

Summary: Amount tendered input allows submit on enter which leads to broken modal
Product: Koha Reporter: Jason Robb <jrobb>
Component: Point of SaleAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

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