Bug 38975

Summary: Payment Type Validation Fails or Causes 500 Error When Providing Change to Patron
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: Point of SaleAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Laura Escamilla 2025-01-27 18:46:28 UTC
To recreate this issue:

1. Set up the Point of Sale (POS) system preference
 --Enable the "EnablePointOfSale" pref
 --Enable the "UseCashRegisters" pref
 --Set up a cash register
 --Enable the "RequirePaymentType"

2. Go to a patron account and create a manual invoice - save and pay. 

3. Make or leave the amount tendered as the charged amount so that you don't have to provide any change. Then attempt to confirm the transaction without adding a payment type. 
 --"This field is required." will pop up next to payment type. 

4. Now change the amount tendered to a higher amount so that you have to provide change to the patron. Then attempt to confirm the transaction type without adding a payment type. 
 --"The amount collected is more than the outstanding charge" pop up box will appear confirming the change you will provide to the patron. Select "Yes". This will cause a 500 error to occur or in some library cases it will go through without providing an error. The completed transaction will not include a payment type and can cause issues with accounting.