Bug 41688

Summary: Refund modal and amount as NaN, rejected comma separator
Product: Koha Reporter: Thibaud Guillot (thibaud_g) <thibaud.guillot>
Component: Point of SaleAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31513
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41688: Fix NaN display in POS refund modal
Bug 41688: Fix NaN display in POS refund modal

Description Thibaud Guillot (thibaud_g) 2026-01-22 15:45:35 UTC
Hello @ll

The problem here is on the refund modal, when retrieving the default value before being modified it is NaN because in some cases for decimal separators with comma, the recovery fails due to formatting a value already formatted in js.

After a quick search I think it's a return of bug 31513 fix
Comment 1 Thibaud Guillot (thibaud_g) 2026-01-22 15:54:53 UTC Comment hidden (obsolete)
Comment 2 Thibaud Guillot (thibaud_g) 2026-01-22 15:56:39 UTC
Created attachment 191872 [details] [review]
Bug 41688: Fix NaN display in POS refund modal

Test plan:

Prerequisites: CurrencyFormat as 'FR' activated, have already produced a payment (with a comma separator)

1. Go to POS > register > transaction history
2. Click "Issue refund" on any paid transaction
3. Verify "Amount paid" shows correct amount (not NaN but get the value
   with comma separator)
4. Enter refund amount (point separator is mandatory to valid input)
5. Verify no validation error occurs
6. Process refund successfully