Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Lucyna Laska
Lucyna LaskaReporter
Brandon Bowersox-Johnson
Brandon Bowersox-JohnsonStory Points
5
Original estimate
1w
Time tracking
Components
Sprint
None
Fix versions
Priority
Time Assistant
Time Assistant
Created November 8, 2016 at 9:08 PM
Updated April 4, 2018 at 6:02 PM
Resolved February 10, 2017 at 12:01 PM
OpenLMIS v3 should improve on the Currency and Localization support in the Money class from v2. This is an important part of the v3 theme of making OpenLMIS more extensible with strong translation support.
Acceptance:
Refactoring/clean-up of the Money class to use Joda-Money.
A configuration setting to specify a Currency (as ISO 4217) at the implementation level. That way all the prices stored in that system would have a known currency. (We don't yet need to support multiple different currencies in one implementation.)
An endpoint will exist (in reference data) which returns the Currency setting as a ISO4217.
When formatting the money as a String, it should display the currency symbol on the left or right depending on the currency rule configured.
When amounts of money are returned via the API, the Money should be represented as a Number.
The configuration of currency would include specifying a Unicode symbol or a string to use to display next to any currency values. (EG, PricePerPack could be displayed as €12,00 or $USD12.00 by changing the configuration). The string could be useful in case Unicode does not have a single character for the currency name that some countries use. This should be handled by the standard Currency support.
The Currency in use would cause prices to be stored and displayed with different, appropriate numbers of decimal places of precision. Right now OpenLMIS hard-codes Money values to 2 decimal places.