Bug 22301 - Paying fines is broken when using CurrencyFormat = FR
Summary: Paying fines is broken when using CurrencyFormat = FR
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P1 - high critical (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 11373
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-10 11:46 UTC by Katrin Fischer
Modified: 2019-07-23 12:42 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs (2.14 KB, patch)
2019-02-14 18:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs (2.20 KB, patch)
2019-02-15 06:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22301: (bug 11373 follow-up) Do not format amounts in inputs (2.26 KB, patch)
2019-02-15 11:10 UTC, Martin Renvoize
Details | Diff | Splinter Review

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