From acc8ecf6a33f189908263e1b7fc4e15eec2c283c Mon Sep 17 00:00:00 2001 From: Marco Risaliti Date: Wed, 25 May 2011 19:45:44 +0000 Subject: [PATCH] Removed the method UtilNumber.stringToBigDecimal and the references in webpos component git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1127651 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/base/util/UtilNumber.java | 25 --- .../org/ofbiz/webpos/event/ManagerEvents.xml | 169 +++++++++++------- .../org/ofbiz/webpos/event/PaymentEvents.xml | 106 ++++++----- 3 files changed, 166 insertions(+), 134 deletions(-) diff --git a/framework/base/src/org/ofbiz/base/util/UtilNumber.java b/framework/base/src/org/ofbiz/base/util/UtilNumber.java index c968f8a898..d373d81de3 100644 --- a/framework/base/src/org/ofbiz/base/util/UtilNumber.java +++ b/framework/base/src/org/ofbiz/base/util/UtilNumber.java @@ -20,8 +20,6 @@ package org.ofbiz.base.util; import java.math.BigDecimal; -import java.text.NumberFormat; -import java.text.ParseException; import java.util.HashMap; import java.util.Locale; @@ -252,27 +250,4 @@ public class UtilNumber { return (bd.toString() + "%"); } - - /** - * Method to convert a string into BigDecimal. - * - * @param stringToConvert String to convert to BigDecimal - * @return The string converted to BigDecimal - */ - public static BigDecimal stringToBigDecimal(String stringToConvert, Locale locale) { - if (stringToConvert != null && stringToConvert != "") { - Number numb = null; - NumberFormat nf = NumberFormat.getInstance(locale); - nf.setMaximumFractionDigits(10); - try { - numb = nf.parse(stringToConvert); - return (new BigDecimal(numb.toString())); - } catch (ParseException e) { - return null; - } - } - else { - return null; - } - } } diff --git a/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml b/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml index ef4d9c5945..c9fa1e088f 100644 --- a/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml +++ b/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml @@ -31,27 +31,31 @@ under the License. - - - - - - - + + + + + + + + + + + + + + - + - - - - + @@ -82,67 +86,92 @@ under the License. - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - + + + + + @@ -271,15 +300,19 @@ under the License. - - - - - - + + + + + + + + + + - + @@ -323,16 +356,20 @@ under the License. - - - - - - + + + + + + + + + + - + diff --git a/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml b/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml index 8600af4ee0..e2cccf7b19 100644 --- a/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml +++ b/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml @@ -27,18 +27,23 @@ under the License. - - - + + - - - - + + + + + + + + + + - + @@ -47,17 +52,17 @@ under the License. - + - + - + @@ -80,24 +85,29 @@ under the License. - - - + + - - - - + + + + + + + + + + - + - + @@ -125,7 +135,7 @@ under the License. - + @@ -163,24 +173,29 @@ under the License. - - - + + - - - - + + + + + + + + + + - + - + @@ -204,7 +219,7 @@ under the License. - + @@ -242,24 +257,29 @@ under the License. - - - + + - - - - + + + + + + + + + + - + - + @@ -297,7 +317,7 @@ under the License. - + @@ -351,7 +371,7 @@ under the License. - + @@ -364,7 +384,7 @@ under the License. - +