Commit 3298d405 authored by manohar's avatar manohar

multiple currency allowed validation commented


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94273 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c3d133df
...@@ -414,6 +414,13 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -414,6 +414,13 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
else
{
errCode = "VMCURRCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
} }
else if (childNodeName.equalsIgnoreCase("acct_code__bal")) else if (childNodeName.equalsIgnoreCase("acct_code__bal"))
{ {
...@@ -981,7 +988,28 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -981,7 +988,28 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
currCode = this.genericUtility.getColumnValue("curr_code", dom); currCode = this.genericUtility.getColumnValue("curr_code", dom);
if (currCode != null && currCode.trim().length() > 0) if (currCode != null && currCode.trim().length() > 0)
{ {
hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1); sql = "select count(*) from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
if (cnt == 0)
{
errCode = "VMCUR1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
/*hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1);
if(hcurrCode != null && hcurrCode.trim().length() > 0) if(hcurrCode != null && hcurrCode.trim().length() > 0)
{ {
if (currCode.trim().equals(hcurrCode.trim())) if (currCode.trim().equals(hcurrCode.trim()))
...@@ -990,6 +1018,14 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -990,6 +1018,14 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
*/
}
else
{
errCode = "VMCURRCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
} }
} }
else if (childNodeName.equalsIgnoreCase("acct_code__ar")) else if (childNodeName.equalsIgnoreCase("acct_code__ar"))
...@@ -1491,6 +1527,26 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -1491,6 +1527,26 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
currCode = this.genericUtility.getColumnValue("curr_code", dom); currCode = this.genericUtility.getColumnValue("curr_code", dom);
if(currCode != null && currCode.trim().length() > 0) if(currCode != null && currCode.trim().length() > 0)
{ {
sql = "select count(*) from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
if (cnt == 0)
{
errCode = "VMCUR1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
/*
hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1); hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1);
exchRate = doublevalue(this.genericUtility.getColumnValue("exch_rate", dom)); exchRate = doublevalue(this.genericUtility.getColumnValue("exch_rate", dom));
if (!currCode.trim().equalsIgnoreCase(hcurrCode.trim()) && (exchRate != 1.0)) if (!currCode.trim().equalsIgnoreCase(hcurrCode.trim()) && (exchRate != 1.0))
...@@ -1499,6 +1555,8 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -1499,6 +1555,8 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
*/
} }
else else
{ {
...@@ -1641,6 +1699,26 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -1641,6 +1699,26 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
currCode = this.genericUtility.getColumnValue("curr_code", dom); currCode = this.genericUtility.getColumnValue("curr_code", dom);
if(currCode != null && currCode.trim().length() > 0) if(currCode != null && currCode.trim().length() > 0)
{ {
sql = "select count(*) from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
if (cnt == 0)
{
errCode = "VMCUR1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
/*
hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1); hcurrCode = this.genericUtility.getColumnValue("curr_code", dom1);
exchRate = Double.parseDouble(this.genericUtility.getColumnValue("exch_rate", dom)); exchRate = Double.parseDouble(this.genericUtility.getColumnValue("exch_rate", dom));
if(!currCode.trim().equals(hcurrCode.trim())) if(!currCode.trim().equals(hcurrCode.trim()))
...@@ -1649,6 +1727,14 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -1649,6 +1727,14 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
*/
}
else
{
errCode = "VMCURRCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
} }
} }
......
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