Bug 41688 - Refund modal and amount as NaN, rejected comma separator
Summary: Refund modal and amount as NaN, rejected comma separator
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Point of Sale (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-22 15:45 UTC by Thibaud Guillot (thibaud_g)
Modified: 2026-01-22 15:56 UTC (History)
1 user (show)

See Also:
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 (6.35 KB, patch)
2026-01-22 15:54 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 41688: Fix NaN display in POS refund modal (6.40 KB, patch)
2026-01-22 15:56 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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