Commit 7307dc6f authored by agaikwad's avatar agaikwad

Request_id-S15FSUN005


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99098 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3ac598b0
......@@ -67,12 +67,14 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
int cnt = 0;
int ctr = 0;
String itemCode = "";
String countcode ="";
int currentFormNo = 0;
int childNodeListLength;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = null;
String taxChap = "";
ConnDriver connDriver = new ConnDriver();
try {
System.out.println("wfValData called");
......@@ -117,15 +119,11 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
break;
}
}
if (childNodeName.equalsIgnoreCase("item_code")) {
itemCode = genericUtility.getColumnValue("item_code",
dom);
if (itemCode == null || itemCode.trim().length() == 0) {
errCode = "STKVALITCO";
errString = getErrorString("item_code", errCode,
userId);
break;
} else {
if (childNodeName.equalsIgnoreCase("item_code"))
{
itemCode = genericUtility.getColumnValue("item_code",dom);
if(itemCode != null && itemCode.trim().length() > 0)
{
sql = "select count(1) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -145,15 +143,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
break;
}
}
} else if (childNodeName.equalsIgnoreCase("count_code")) {
String countcode = genericUtility.getColumnValue("count_code", dom);
if (countcode == null || countcode.trim().length() == 0) {
errCode = "STKVALCRCO";
errString = getErrorString("count_code", errCode,
userId);
break;
}
else{
} else if (childNodeName.equalsIgnoreCase("count_code"))
{
countcode = genericUtility.getColumnValue("count_code", dom);
if(countcode != null && countcode.trim().length() > 0)
{
sql = "select count(1) from country where count_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, countcode);
......@@ -174,16 +169,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
}
}
if (childNodeName.equalsIgnoreCase("tax_chap")) {
String taxChap = null;
if (childNodeName.equalsIgnoreCase("tax_chap"))
{
taxChap = genericUtility.getColumnValue("tax_chap", dom);
if (taxChap == null || taxChap.trim().length() == 0) {
errCode = "STKVALTXCP";
errString = getErrorString("tax_chap", errCode,
userId);
break;
}
else{
System.out.println("Tax chapter"+taxChap);
if(taxChap != null && taxChap.trim().length() > 0)
{
sql = " SELECT COUNT(*) FROM taxchap WHERE tax_chap = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxChap.trim());
......@@ -194,8 +185,7 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
}
if (cnt == 0) {
errCode = "INTAXCHAP";
errString = getErrorString("tax_chap", errCode,
userId);
errString = getErrorString("tax_chap", errCode,userId);
}
rs.close();
rs = null;
......@@ -204,6 +194,30 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
pstmt = null;
}
}
System.out.println("Value of itemcode is:"+col);
System.out.println("Value of Country code is:"+col1);
System.out.println("Value of tax chapter is:"+col2);
if (col == null)
{
errString = getErrorString(" ", "STKVALITCO", userId);
break;
}
if (col1 == null)
{
errString = getErrorString(" ", "STKVALCRCO", userId);
break;
}
if (col2 == null)
{
errString = getErrorString(" ", "STKVALTXCP", userId);
break;
}
if(col.trim().length() == 0 && col1.trim().length()==0 && col2.trim().length() == 0 )
{
System.out.println("column is space");
errString = getErrorString(" ", "VMDUPREC2", userId);
break;
}
}
break;
}
......
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