IDEMPIERE-1792 Fixed Hiep default logic patch

This commit is contained in:
tsvikruha 2014-06-04 11:52:40 -05:00
parent 79bdd00235
commit ae2f5b0da0
1 changed files with 2 additions and 2 deletions

View File

@ -589,7 +589,7 @@ public class GridField
* (b) SQL Statement (for data integity & consistency) * (b) SQL Statement (for data integity & consistency)
*/ */
String defStr = ""; String defStr = "";
if (m_vo.DefaultValue.startsWith("@SQL=")) if (m_vo.DefaultValue != null && m_vo.DefaultValue.startsWith("@SQL="))
{ {
String sql = m_vo.DefaultValue.substring(5); // w/o tag String sql = m_vo.DefaultValue.substring(5); // w/o tag
//sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables //sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables
@ -637,7 +637,7 @@ public class GridField
/** /**
* (c) Field DefaultValue === similar code in AStartRPDialog.getDefault === * (c) Field DefaultValue === similar code in AStartRPDialog.getDefault ===
*/ */
if (!m_vo.DefaultValue.equals("") && !m_vo.DefaultValue.startsWith("@SQL=")) if (m_vo.DefaultValue != null && !m_vo.DefaultValue.equals("") && !m_vo.DefaultValue.startsWith("@SQL="))
{ {
defStr = ""; // problem is with texts like 'sss;sss' defStr = ""; // problem is with texts like 'sss;sss'
// It is one or more variables/constants // It is one or more variables/constants