When we made the decision to support only a single currency on an implementation the reasoning that I remember was:
-
we only really have the need for tracking the cost of an Orderable so that we may sum the price across line items in something like a Requisition, Order, etc.
-
we might compare that cost to some budget level.
-
we don’t want the responsibility of needing to convert between currencies. It’s more work than what the above is trying to provide: a way for budget owners to see how a Requisition or Order will effect their budget . I wouldn’t expect multiple currencies to help this here.
Next when we discussed moving to Joda money and supporting a single currency, the idea was that the currency should be set once, at the beginning of an implementation, and that subsequent changes are fine, though without any implicit conversion- so buyer beware. To me this means it should be some setting in the .env file- there’s an ISO standard for what the value should be that Joda money supports. This shouldn’t be a compile time setting.
What I believe should be done:
Does that sound right?
Josh
···
Nick Reid | nick.reid@villagereach.org
Friendly Neighborhood Spiderman, Information Systems Group
VillageReach** *** Starting at the Last Mile
*2900 Eastlake Ave. E, Suite 230, Seattle, WA 98102, USA
CELL: +1.510.410.0020
SKYPE: nickdotreid
www.villagereach.org
From:
openlmis-dev@googlegroups.com openlmis-dev@googlegroups.com on behalf of jkondrat@soldevelo.com jkondrat@soldevelo.com
Sent: Tuesday, May 9, 2017 7:03:55 AM
To: OpenLMIS Dev
Subject: [openlmis-dev] Currency configuration
Hello everyone!
The Malawi Team were recently trying to change currency in their implementation. It turned out that it is only configurable at compile time as per Nick’s comment on OLMIS-1333. The problem here is that we would have to fork the entire Reference Data repository in order to change the currency. Currently, we got around it by changing the UI configuration and keeping ref data as is, but that may not work for every currency and once we have some calculations based on them.
My question is - wouldn’t it be better to specify it in the bootstrap data? I can imagine that other implementations will be also facing this problem. I tried fiddling with the code a bit and the biggest problem with this approach is that Joda Money requires us to specify the currency to store it. Currently, the CURRENCY_CODE constant is used in ProgramOrderable to store pricePerPack.
One approach would be to add another column that holds the currency (like I was trying to get it done on currency-config branch). Perhaps writing a custom JPA attribute converter is also possible?
Thanks,
Jakub
–

Jakub Kondrat
Software Developer
jkondrat@soldevelo.com
SolDevelo Sp. z o. o. [LLC]
Office: +48 58 782 45 40 / Fax: +48 58 782 45 41Al. Zwycięstwa 96/9881-451, Gdynia
http://www.soldevelo.com
Place of registration: Regional Court for the City of GdanskKRS: 0000332728, TAX ID: PL5862240331, REGON: 220828585,Share capital: 60,000.00 PLN
–
You received this message because you are subscribed to the Google Groups “OpenLMIS Dev” group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.
To post to this group, send email to
openlmis-dev@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/openlmis-dev/41987b86-67d1-4ecf-acd6-f9ca15e50ad3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
openlmis-dev+unsubscribe@googlegroups.com
openlmis-dev@googlegroups.com
https://groups.google.com/d/msgid/openlmis-dev/MWHPR02MB322930B24259214065F88F8E94EF0%40MWHPR02MB3229.namprd02.prod.outlook.com
https://groups.google.com/d/optout