From c71d3662087ed705498175a36c987b29a3b6ae94 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Wed, 7 Jan 2009 22:25:28 +0000 Subject: [PATCH] The current cost field of WF in integer and should be Dec http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2492433&group_id=176962 --- .../src/org/adempiere/pipo/handler/WorkflowElementHandler.java | 3 ++- base/src/org/compiere/wf/MWorkflow.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/src/org/adempiere/pipo/handler/WorkflowElementHandler.java b/base/src/org/adempiere/pipo/handler/WorkflowElementHandler.java index 8e7bebd807..550fc6aaf9 100644 --- a/base/src/org/adempiere/pipo/handler/WorkflowElementHandler.java +++ b/base/src/org/adempiere/pipo/handler/WorkflowElementHandler.java @@ -16,6 +16,7 @@ *****************************************************************************/ package org.adempiere.pipo.handler; +import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -131,7 +132,7 @@ public class WorkflowElementHandler extends AbstractElementHandler { if(getStringValue(atts, "Duration") != null) m_Workflow.setDuration(Integer.valueOf(atts.getValue("Duration"))); if(getStringValue(atts, "Cost") != null) - m_Workflow.setCost(Integer.valueOf(atts.getValue("Cost"))); + m_Workflow.setCost(new BigDecimal(atts.getValue("Cost"))); m_Workflow.setWorkingTime(Integer.valueOf(atts .getValue("WorkingTime"))); diff --git a/base/src/org/compiere/wf/MWorkflow.java b/base/src/org/compiere/wf/MWorkflow.java index 4460a46be2..3a0e0482a2 100644 --- a/base/src/org/compiere/wf/MWorkflow.java +++ b/base/src/org/compiere/wf/MWorkflow.java @@ -16,6 +16,7 @@ *****************************************************************************/ package org.compiere.wf; +import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -173,7 +174,7 @@ public class MWorkflow extends X_AD_Workflow setIsDefault (false); setPublishStatus (PUBLISHSTATUS_UnderRevision); // U setVersion (0); - setCost (0); + setCost (Env.ZERO); setWaitingTime (0); setWorkingTime (0); setIsBetaFunctionality(false);