diff --git a/framework/common/script/org/ofbiz/common/CommonServices.xml b/framework/common/script/org/ofbiz/common/CommonServices.xml index 0e701f3494..5195d110af 100644 --- a/framework/common/script/org/ofbiz/common/CommonServices.xml +++ b/framework/common/script/org/ofbiz/common/CommonServices.xml @@ -132,7 +132,7 @@ under the License. - + @@ -144,7 +144,7 @@ under the License. - + diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml index b8132e78c4..80abe5df9c 100644 --- a/framework/common/servicedef/services.xml +++ b/framework/common/servicedef/services.xml @@ -318,18 +318,18 @@ under the License. Make a unit of measure conversion, first using UomConversion, then with UomConversionDated - + - + Make a unit of measure conversion, using CustomMethod entity - + - + Look up progress made in File Upload process diff --git a/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy b/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy index 4e34b41d54..04e8500ace 100644 --- a/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy +++ b/specialpurpose/mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy @@ -42,12 +42,12 @@ invoiceType = delegator.findByPrimaryKey("InvoiceType", ["invoiceTypeId" : invoi if (currencyUomId && otherCurrency && otherCurrency != currencyUomId && !otherCurrency.equals(currencyUomId)) { result = dispatcher.runSync("convertUom", [uomId : currencyUomId, uomIdTo : otherCurrency, - originalValue : new Double("1.00"), + originalValue : BigDecimal.ONE), asOfDate : invoiceDate]); if (result.convertedValue != null) { - context.total = (org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)).multiply(new BigDecimal(result.convertedValue.toString())).setScale(decimals, rounding); - context.amountToApply = org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId).multiply(new BigDecimal(result.convertedValue.toString())).setScale(decimals, rounding); + context.total = (org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)).multiply((BigDecimal)result.convertedValue).setScale(decimals, rounding); + context.amountToApply = org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId).multiply((BigDecimal)result.convertedValue).setScale(decimals, rounding); context.currencyUomId = otherCurrency; } } else { diff --git a/specialpurpose/myportal/webapp/myportal/WEB-INF/actions/ConvertInvoiceCurrency.groovy b/specialpurpose/myportal/webapp/myportal/WEB-INF/actions/ConvertInvoiceCurrency.groovy index 4e34b41d54..04e8500ace 100644 --- a/specialpurpose/myportal/webapp/myportal/WEB-INF/actions/ConvertInvoiceCurrency.groovy +++ b/specialpurpose/myportal/webapp/myportal/WEB-INF/actions/ConvertInvoiceCurrency.groovy @@ -42,12 +42,12 @@ invoiceType = delegator.findByPrimaryKey("InvoiceType", ["invoiceTypeId" : invoi if (currencyUomId && otherCurrency && otherCurrency != currencyUomId && !otherCurrency.equals(currencyUomId)) { result = dispatcher.runSync("convertUom", [uomId : currencyUomId, uomIdTo : otherCurrency, - originalValue : new Double("1.00"), + originalValue : BigDecimal.ONE), asOfDate : invoiceDate]); if (result.convertedValue != null) { - context.total = (org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)).multiply(new BigDecimal(result.convertedValue.toString())).setScale(decimals, rounding); - context.amountToApply = org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId).multiply(new BigDecimal(result.convertedValue.toString())).setScale(decimals, rounding); + context.total = (org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)).multiply((BigDecimal)result.convertedValue).setScale(decimals, rounding); + context.amountToApply = org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId).multiply((BigDecimal)result.convertedValue).setScale(decimals, rounding); context.currencyUomId = otherCurrency; } } else {