Bug 24278

Summary: Replace Locale::Currency::Format because it's buggy
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: NoticesAssignee: Martin Renvoize <martin.renvoize>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17138
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20352
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 20352    
Attachments: Currency module test script
Module Test Script

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