Commit ed4f2d0c authored by sgadve's avatar sgadve

Offer field validation for only Value Replacement not for the Quantity Replacement

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200153 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9f1bba3c
...@@ -1054,29 +1054,33 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -1054,29 +1054,33 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
settlemth=genericUtility.getColumnValue("settle_mth", dom2,"1"); settlemth=genericUtility.getColumnValue("settle_mth", dom2,"1");
custCode = genericUtility.getColumnValue("cust_code", dom2,"1"); custCode = genericUtility.getColumnValue("cust_code", dom2,"1");
String offer = E12GenericUtility.checkNull(genericUtility.getColumnValue("offer", dom)); String offer = E12GenericUtility.checkNull(genericUtility.getColumnValue("offer", dom));
System.out.println("offer settlemth : P : "+settlemth); System.out.println("offer settlemth : P : "+settlemth);
System.out.println("offer custCode: P : "+custCode); System.out.println("offer custCode: P : "+custCode);
if(offer != null && offer.trim().length() <= 0) if(offer != null && offer.trim().length() <= 0)
{ {
errList.add("VMNOOFFER"); errList.add("VMNOOFFER");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else else
{ {
String offerSql = "SELECT COUNT(1) FROM SCHEME_APPRV WHERE APRV_STATUS= ? and CUST_CODE__BILL = ? "; //Added by Saiprasad G. this validation for only Value Replacement not for the Quantity Replacement on [26-APR-19]START
PreparedStatement pStmt1 = conn.prepareStatement(offerSql); if(settlemth.equalsIgnoreCase("V"))
pStmt1.setString(1, "A");
pStmt1.setString(2, custCode);
rs = pStmt1.executeQuery();
if(rs.next())
{ {
int count = rs.getInt(1); String offerSql = "SELECT COUNT(1) FROM SCHEME_APPRV WHERE APRV_STATUS= ? and CUST_CODE__BILL = ? ";
if(count <= 0) PreparedStatement pStmt1 = conn.prepareStatement(offerSql);
pStmt1.setString(1, "A");
pStmt1.setString(2, custCode);
rs = pStmt1.executeQuery();
if(rs.next())
{ {
errList.add("VMINVOFFER"); int count = rs.getInt(1);
errFields.add(childNodeName.toLowerCase()); if(count <= 0)
{
errList.add("VMINVOFFER");
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