Author: lektran
Date: Wed May 23 01:22:24 2007
New Revision: 540878
URL:
http://svn.apache.org/viewvc?view=rev&rev=540878Log:
Applied fix from trunk for revision: 533347
Modified:
ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilFormatOut.java
Modified: ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilFormatOut.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilFormatOut.java?view=diff&rev=540878&r1=540877&r2=540878==============================================================================
--- ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilFormatOut.java (original)
+++ ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilFormatOut.java Wed May 23 01:22:24 2007
@@ -78,13 +78,13 @@
public static String formatCurrency(double price, String isoCode, Locale locale, int maximumFractionDigits) {
//Debug.logInfo("formatting currency: " + price + ", isoCode: " + isoCode + ", locale: " + locale, module);
com.ibm.icu.text.NumberFormat nf = com.ibm.icu.text.NumberFormat.getCurrencyInstance(locale);
- if (maximumFractionDigits >= 0) {
- nf.setMaximumFractionDigits(maximumFractionDigits);
- }
if (isoCode != null && isoCode.length() > 1) {
nf.setCurrency(com.ibm.icu.util.Currency.getInstance(isoCode));
} else {
Debug.logWarning("No isoCode specified to format currency value:" + price, module);
+ }
+ if (maximumFractionDigits >= 0) {
+ nf.setMaximumFractionDigits(maximumFractionDigits);
}
return nf.format(price);
}