Add LongDomainType case to save its value as Numeric.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 14 Dec 2010 14:10:28 +0100
changeset 9124 543120570dec
parent 9123 8f494397e400
child 9125 63908817afee
Add LongDomainType case to save its value as Numeric.
modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java	Tue Dec 14 14:09:37 2010 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java	Tue Dec 14 14:10:28 2010 +0100
@@ -32,6 +32,7 @@
 import org.openbravo.base.model.domaintype.BigDecimalDomainType;
 import org.openbravo.base.model.domaintype.DateDomainType;
 import org.openbravo.base.model.domaintype.DomainType;
+import org.openbravo.base.model.domaintype.LongDomainType;
 import org.openbravo.base.model.domaintype.StringDomainType;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.structure.BaseOBObject;
@@ -161,7 +162,8 @@
       } else if (domainType.getClass().equals(DateDomainType.class)) {
         Date date = xmlDateFormat.parse(stringValue);
         parameterValue.setValueDate(date);
-      } else if (domainType.getClass().getSuperclass().equals(BigDecimalDomainType.class)) {
+      } else if (domainType.getClass().getSuperclass().equals(BigDecimalDomainType.class)
+          || domainType.getClass().getSuperclass().equals(LongDomainType.class)) {
         parameterValue.setValueNumber(new BigDecimal(stringValue));
       } else { // default
         parameterValue.setValueString(stringValue);