Bug 22301

Summary: Paying fines is broken when using CurrencyFormat = FR
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Fines and feesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P1 - high CC: fridolin.somers, jonathan.druart, josef.moravec, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 11373    
Bug Blocks:    
Attachments: Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs

Description Katrin Fischer 2019-02-10 11:46:52 UTC
Using CurrencyFormat FR: 

When paying an amount the amount now shows with comma decimal instead of decimal dot. This creates big issues when trying to pay amounts correctly.

For example: Trying to pay 9,55. Go into the input field and change 9 to 5, Koha will turn it into 555.00.

Prices currently need to all be displayed with decimal dot in input fields. 

Please fix urgently.
Comment 1 Jonathan Druart 2019-02-14 17:54:55 UTC
Hi Katrin,

I cannot recreate:
"Create manual invoice" with amount=9.55
"Pay fines" > "Pay amount" > "Collect from patron" 5.55 > Confirm

I see "-5,55" in the table.

https://snag.gy/KEMAIu.jpg
Comment 2 Jonathan Druart 2019-02-14 17:58:04 UTC
Heh, let me update my outdated local repo :)
Comment 3 Jonathan Druart 2019-02-14 18:03:34 UTC
Created attachment 85136 [details] [review]
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs

on_edition flag must be set when the Price plugin is used on inputs.

Prices currently need to all be displayed with decimal dot in input
fields.

Test plan:
Trying to pay 9,55. Go into the input field and change 9 to
5.

Without this patch Koha will turn it into 555.00.
Comment 4 Jonathan Druart 2019-02-14 18:32:21 UTC
New QA check is going to be added, see https://gitlab.com/koha-community/qa-test-tools/issues/10
Comment 5 Katrin Fischer 2019-02-14 19:57:06 UTC
It changed on the fly in the form immediately after I went in and changed the number - might be a JavaScript thing on the form. I didn't save it.
Comment 6 Katrin Fischer 2019-02-14 19:57:49 UTC
Thx for fixing and so great to see you back!
Comment 7 Katrin Fischer 2019-02-15 06:59:25 UTC
Created attachment 85142 [details] [review]
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs

on_edition flag must be set when the Price plugin is used on inputs.

Prices currently need to all be displayed with decimal dot in input
fields.

Test plan:
Trying to pay 9,55. Go into the input field and change 9 to
5.

Without this patch Koha will turn it into 555.00.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Martin Renvoize 2019-02-15 11:10:54 UTC
Created attachment 85154 [details] [review]
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs

on_edition flag must be set when the Price plugin is used on inputs.

Prices currently need to all be displayed with decimal dot in input
fields.

Test plan:
Trying to pay 9,55. Go into the input field and change 9 to
5.

Without this patch Koha will turn it into 555.00.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2019-02-15 11:12:38 UTC
Passing QA.. annoyed I missed it the first time round testing.. Great to here we're going to start catching it with a qa check, thanks for that Jonathan.
Comment 10 Nick Clemens 2019-02-15 18:51:35 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Martin Renvoize 2019-02-25 12:12:46 UTC
Bug not in 18.11.x, marking RESOLVED FIXED.