Commit af33828d authored by arawankar's avatar arawankar

ItemIC.java

-Changes made to not allow blank spaces in tax_chap,tax_class

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194724 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 97697cd0
...@@ -347,7 +347,10 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -347,7 +347,10 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
// Changed By Nasruddin khan [19-SEP-16] END // Changed By Nasruddin khan [19-SEP-16] END
else if(childNodeName.equalsIgnoreCase("unit__pur") || childNodeName.equalsIgnoreCase("unit__sal") || childNodeName.equalsIgnoreCase("unit__rate")) else if(childNodeName.equalsIgnoreCase("unit__pur") || childNodeName.equalsIgnoreCase("unit__sal") || childNodeName.equalsIgnoreCase("unit__rate"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); //Modified by Anjali R. on [19/12/2018][Start]
//childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
childNodeValue = genericUtility.getColumnValue(childNodeName, dom);
//Modified by Anjali R. on [19/12/2018][End]
/* Comment By Nasruddin [19-SEP-16] START /* Comment By Nasruddin [19-SEP-16] START
if (childNodeValue == null || childNodeValue.trim().length() == 0) if (childNodeValue == null || childNodeValue.trim().length() == 0)
...@@ -357,7 +360,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -357,7 +360,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
Comment By Nasruddin [19-SEP-16] END */ Comment By Nasruddin [19-SEP-16] END */
if (childNodeValue != null && childNodeValue.trim().length() > 0) //Modified by Anjali R. on [19/12/2018][Start]
if (childNodeValue != null && childNodeValue.length() > 0 )
//Modified by Anjali R. on [19/12/2018][End]
{ {
sql = "select count(*) from uom where unit = ?"; sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -458,11 +463,18 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -458,11 +463,18 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
//apr_code //apr_code
else if(childNodeName.equalsIgnoreCase("apr_code")) else if(childNodeName.equalsIgnoreCase("apr_code"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); //Modified by Anjali R. on[19/12/2018][Start]
//childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
childNodeValue = genericUtility.getColumnValue(childNodeName, dom);
//Modified by Anjali R. on[19/12/2018][End]
// Changed By Nasruddin [19-SEP-16] // Changed By Nasruddin [19-SEP-16]
// stk_opt = checkNullAndTrim(genericUtility.getColumnValue("stk_opt", dom)); // stk_opt = checkNullAndTrim(genericUtility.getColumnValue("stk_opt", dom));
if (childNodeValue != null && childNodeValue.trim().length() > 0) //Modified by Anjali R. on[19/12/2018][Start]
//if (childNodeValue != null && childNodeValue.trim().length() > 0)
if (childNodeValue != null && childNodeValue.length() > 0 )
//Modified by Anjali R. on[19/12/2018][End]
{ {
//if(!stk_opt.equalsIgnoreCase("0")) //if(!stk_opt.equalsIgnoreCase("0"))
//{ //{
...@@ -491,14 +503,21 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -491,14 +503,21 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
else if(childNodeName.equalsIgnoreCase("tax_chap") ) else if(childNodeName.equalsIgnoreCase("tax_chap") )
//else if(childNodeName.equalsIgnoreCase("tax_chap") || childNodeName.equalsIgnoreCase("tax_chap__rep")) //else if(childNodeName.equalsIgnoreCase("tax_chap") || childNodeName.equalsIgnoreCase("tax_chap__rep"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); //Modified by Anjali R. on [19/12/2018][Start]
//childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
childNodeValue = genericUtility.getColumnValue(childNodeName, dom);
//Modified by Anjali R. on [19/12/2018][End]
/*if (childNodeValue == null || childNodeValue.trim().length() == 0) { /*if (childNodeValue == null || childNodeValue.trim().length() == 0) {
errCode = "VMITEMCD1 "; errCode = "VMITEMCD1 ";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} else */ } else */
if (childNodeValue != null && childNodeValue.trim().length() > 0) //Modified by Anjali R. on [19/12/2018][Start]
//if (childNodeValue != null && childNodeValue.trim().length() > 0)
if (childNodeValue != null && childNodeValue.length() > 0)
//Modified by Anjali R. on [19/12/2018][End]
{ {
sql = "select count(*) from taxchap where tax_chap = ?"; sql = "select count(*) from taxchap where tax_chap = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -522,13 +541,21 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -522,13 +541,21 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
//tax_class //tax_class
else if(childNodeName.equalsIgnoreCase("tax_class")) else if(childNodeName.equalsIgnoreCase("tax_class"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); //Modified by Anjali R. on [19/12/2018][Start]
//childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
childNodeValue = genericUtility.getColumnValue(childNodeName, dom);
//Modified by Anjali R. on [19/12/2018][End]
/*if (childNodeValue == null || childNodeValue.trim().length() == 0) { /*if (childNodeValue == null || childNodeValue.trim().length() == 0) {
errCode = "VMITEMCD1 "; errCode = "VMITEMCD1 ";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} else */ } else */
if (childNodeValue != null && childNodeValue.trim().length() > 0) //Modified by Anjali R. on [19/12/2018][Start]
//if (childNodeValue != null && childNodeValue.trim().length() > 0)
if (childNodeValue != null && childNodeValue.length() > 0 )
//Modified by Anjali R. on [19/12/2018][End]
{ {
sql = "select count(*) from taxclass where tax_class = ?"; sql = "select count(*) from taxclass where tax_class = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -760,9 +787,15 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -760,9 +787,15 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
//emp_code__pln/emp_code__pur/emp_code__iapr //emp_code__pln/emp_code__pur/emp_code__iapr
else if(childNodeName.equalsIgnoreCase("emp_code__pln") || childNodeName.equalsIgnoreCase("emp_code__pur") || childNodeName.equalsIgnoreCase("emp_code__iapr") || childNodeName.equalsIgnoreCase("emp_code__qcaprv")) else if(childNodeName.equalsIgnoreCase("emp_code__pln") || childNodeName.equalsIgnoreCase("emp_code__pur") || childNodeName.equalsIgnoreCase("emp_code__iapr") || childNodeName.equalsIgnoreCase("emp_code__qcaprv"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); //Modified by Anjali R. on [19/12/2018][Start]
//childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
if(childNodeValue.trim().length() > 0) childNodeValue = genericUtility.getColumnValue(childNodeName, dom);
//Modified by Anjali R. on [19/12/2018][End]
//Modified by Anjali R. on [19/12/2018][Start]
//if(childNodeValue.trim().length() > 0)
if(childNodeValue != null && childNodeValue.length() > 0)
//Modified by Anjali R. on [19/12/2018][End]
{/*Changed By Nasruddin [19-SEP-16] START {/*Changed By Nasruddin [19-SEP-16] START
sql = "select count(*) from employee where emp_code = ?"; sql = "select count(*) from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -842,7 +875,11 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -842,7 +875,11 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
else if(childNodeName.equalsIgnoreCase("supp_code__pref")) else if(childNodeName.equalsIgnoreCase("supp_code__pref"))
{ {
childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); childNodeValue = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
if(childNodeValue.trim().length() > 0) //Modified by Anjali R. on [19/12/2018][Start]
//if(childNodeValue.trim().length() > 0)
if(childNodeValue != null && childNodeValue.trim().length() > 0)
//Modified by Anjali R. on [19/12/2018][End]
{ /*Changed By Nasruddin 19-SEP-16 Start { /*Changed By Nasruddin 19-SEP-16 Start
sql = "select count(*) from supplier where supp_code = ?"; sql = "select count(*) from supplier where supp_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1228,7 +1265,11 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1228,7 +1265,11 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
Comment By Nasruddin 19-SEP-16 END */ Comment By Nasruddin 19-SEP-16 END */
if (childNodeValue != null && childNodeValue.trim().length() > 0) if (childNodeValue != null && childNodeValue.trim().length() > 0)
{ {
sql = "select count(*) from brand where code = ?"; //Modified by Anjali R. on [19/12/2018][wrong Where clause column for brand table][Start]
//sql = "select count(*) from brand where code = ?";
sql = "select count(*) from brand where brand_code = ?";
//Modified by Anjali R. on [19/12/2018][wrong Where clause column for brand table][End]
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, childNodeValue); pstmt.setString(1, childNodeValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment