diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index 3b86d17d3f..064e712e26 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -769,8 +769,17 @@ public class GridField { // try timestamp format - then date format -- [ 1950305 ] java.util.Date date = null; + SimpleDateFormat dateTimeFormat = DisplayType.getTimestampFormat_Default(); + SimpleDateFormat dateFormat = DisplayType.getDateFormat_JDBC(); + SimpleDateFormat timeFormat = DisplayType.getTimeFormat_Default(); try { - date = DisplayType.getTimestampFormat_Default().parse (value); + if (m_vo.displayType == DisplayType.Date) { + date = dateFormat.parse (value); + } else if (m_vo.displayType == DisplayType.Time) { + date = timeFormat.parse (value); + } else { + date = dateTimeFormat.parse (value); + } } catch (java.text.ParseException e) { date = DisplayType.getDateFormat_JDBC().parse (value); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WProcessParameter.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WProcessParameter.java index d098ba74c7..f7370feb50 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WProcessParameter.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WProcessParameter.java @@ -71,14 +71,14 @@ public class WProcessParameter implements IFormController { if (processPara.getColumnName().equals(para.getParameterName())) { schedulerPara.setAD_Process_Para_ID(processPara.getAD_Process_Para_ID()); if (DisplayType.isNumeric(processPara.getAD_Reference_ID())) { - if (para.getP_Number() != null) + if (para.get_Value(MPInstancePara.COLUMNNAME_P_Number) != null) schedulerPara.setParameterDefault(para.getP_Number().toString()); - if (processPara.isRange() && para.getP_Number_To() != null) + if (processPara.isRange() && para.get_Value(MPInstancePara.COLUMNNAME_P_Number_To) != null) schedulerPara.setParameterToDefault(para.getP_Number_To().toString()); } else if (DisplayType.isID(processPara.getAD_Reference_ID())) { - if (para.getP_Number() != null) + if (para.get_Value(MPInstancePara.COLUMNNAME_P_Number) != null) schedulerPara.setParameterDefault(Integer.toString(para.getP_Number().intValue())); - if (processPara.isRange() && para.getP_Number_To() != null) + if (processPara.isRange() && para.get_Value(MPInstancePara.COLUMNNAME_P_Number_To) != null) schedulerPara.setParameterToDefault(Integer.toString(para.getP_Number_To().intValue())); } else if (DisplayType.isDate(processPara.getAD_Reference_ID())) { if (para.getP_Date() != null)