Bug 24278 - Replace Locale::Currency::Format because it's buggy
Summary: Replace Locale::Currency::Format because it's buggy
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
Depends on:
Blocks: 20352
  Show dependency treegraph
Reported: 2019-12-19 16:16 UTC by Katrin Fischer
Modified: 2021-03-25 11:31 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:

Currency module test script (1.12 KB, application/x-perl)
2020-08-06 09:21 UTC, Martin Renvoize
Module Test Script (1.48 KB, application/x-perl)
2020-11-26 12:34 UTC, Martin Renvoize

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2019-12-19 16:16:31 UTC
Locale::Currency::Format is used to format the overdue fine printed using items.fines in the overdue notices. I am not sure if it's used in other places.

The module has not seen a new version in a longer while and is buggy for some currencies:

COP (Colombian peso) - wrong currency symbol
RSD (Serbian dinar) - wrong currency symbol
TYR (Turkey) - amounts are rounded and printed without decimals

What we do at the moment is adding "wrong" codes for those so the formatting is avoided... but when you want to use acq etc this could be a bigger issue.

Maybe we shoudl replace the module by enabling the use of the price filter in all notices if not the case yet and treat the existing placeholder items.fine as if the price filter was used?
Comment 1 Katrin Fischer 2019-12-19 16:18:06 UTC
TYR also has a wrong currency symbol.
Comment 2 Martin Renvoize 2020-05-01 10:50:26 UTC
Hmm.. can we write some tests for this?
Comment 3 Katrin Fischer 2020-05-04 07:23:09 UTC
I've looked this up in our ticket system, what we had happen for TYR was:

- Wrong currency symbol (₤ instead of  TL or ₺)
- 1.40 would display as 1 (rounded, cutting off the decimals)
Comment 4 Martin Renvoize 2020-08-06 09:21:00 UTC
Created attachment 107870 [details]
Currency module test script

A quick test script to show the various outputs of a couple of different currency modules.
Comment 5 Martin Renvoize 2020-11-26 12:34:51 UTC
Created attachment 114006 [details]
Module Test Script