Commit ba036c61 authored by prane's avatar prane

amount type dropdown value removed for positive and both only negative is aplicable

and removed cust_code_fr and cust_code_to default value(00,zz)

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@188282 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 01eebe5f
...@@ -83,7 +83,7 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP ...@@ -83,7 +83,7 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP
*/ */
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
System.out.println("******************* Pavan Rane *******************"); //System.out.println("******************* Pavan Rane *******************");
System.out.println("******* Inside RecPayXfrIC wfValData **********"); System.out.println("******* Inside RecPayXfrIC wfValData **********");
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
...@@ -100,14 +100,14 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP ...@@ -100,14 +100,14 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP
{ {
int currentFormNo = 0, childNodeListLength = 0, ctr = 0, cnt = 0; int currentFormNo = 0, childNodeListLength = 0, ctr = 0, cnt = 0;
String childNodeName = "", errorType = "", errCode = ""; String childNodeName = "", errorType = "", errCode = "";
String saleOrder=""; String saleOrder="", custCodeTo = "",custCodeFr = "";
ArrayList<String> errList = new ArrayList<String>(); ArrayList<String> errList = new ArrayList<String>();
ArrayList<String> errFields = new ArrayList<String>(); ArrayList<String> errFields = new ArrayList<String>();
conn = getConnection(); conn = getConnection();
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
//SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); //SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("xtraParam----->>["+xtraParams+"]"); //System.out.println("xtraParam----->>["+xtraParams+"]");
System.out.println("editFlag ------------>>["+editFlag+"]"); //System.out.println("editFlag ------------>>["+editFlag+"]");
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
...@@ -147,8 +147,52 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP ...@@ -147,8 +147,52 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP
} }
} }
} }
else if (childNodeName.equalsIgnoreCase("descr")) //added by Pavan R on 27jul18-start[to validate cust_fr and cust_to must be same]
{} else if (childNodeName.equalsIgnoreCase("cust_code__fr"))
{
custCodeFr = checkNull(genericUtility.getColumnValue("cust_code__fr", dom));
if (custCodeFr == null || custCodeFr.trim().length() == 0)
{
errList.add("VMCUSTCD1");
errFields.add(childNodeName.toLowerCase());
}
else if (custCodeFr != null && custCodeFr.trim().length() > 0)
{
sql = "select count(*) cnt from customer where cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeFr);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if (cnt == 0)
{
errList.add("VMCUST1");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.equalsIgnoreCase("cust_code__to"))
{
custCodeTo = checkNull(genericUtility.getColumnValue("cust_code__to", dom));
custCodeFr = checkNull(genericUtility.getColumnValue("cust_code__fr", dom));
if (custCodeTo == null || custCodeTo.trim().length() == 0)
{
errList.add("VMCUSTCD1");
errFields.add(childNodeName.toLowerCase());
}
else if (!custCodeTo.trim().equals(custCodeFr.trim()))
{
errList.add("VMCUSTMIS");
errFields.add(childNodeName.toLowerCase());
}
}
//end
}//end of for loop }//end of for loop
break;// end of switch break;// end of switch
}// end of switch }// end of switch
...@@ -259,7 +303,7 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP ...@@ -259,7 +303,7 @@ public class RecPayXfrIC extends ValidatorEJB implements RecPayXfrICRemote, RecP
Node childNode = null; Node childNode = null;
String childNodeName = null; String childNodeName = null;
try { try {
System.out.println("******************* Pavan Rane *******************"); //System.out.println("******************* Pavan Rane *******************");
System.out.println("----------------Inside itemChanged-------------------"); System.out.println("----------------Inside itemChanged-------------------");
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
......
...@@ -56,7 +56,7 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay ...@@ -56,7 +56,7 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay
public String getData(Document dom, Document dom1, String windowName, String xtraParams) throws RemoteException, ITMException public String getData(Document dom, Document dom1, String windowName, String xtraParams) throws RemoteException, ITMException
{ {
System.out.println("******************* PAVAN RANE *******************"); //System.out.println("******************* PAVAN RANE *******************");
System.out.println("----------- Inside RecPayXfrPrc getData -----------"); System.out.println("----------- Inside RecPayXfrPrc getData -----------");
String siteCode = ""; String siteCode = "";
String custFr = ""; String custFr = "";
...@@ -320,7 +320,7 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay ...@@ -320,7 +320,7 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay
} }
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException
{ {
System.out.println("******************* PAVAN RANE *******************"); //System.out.println("******************* PAVAN RANE *******************");
System.out.println("----------- Inside RecPayXfrPrc process -----------"); System.out.println("----------- Inside RecPayXfrPrc process -----------");
String errString = ""; String errString = "";
String refSer = ""; String refSer = "";
...@@ -514,31 +514,27 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay ...@@ -514,31 +514,27 @@ public class RecPayXfrPrc extends ProcessEJB implements RecPayXfrPrcLocal,RecPay
} }
} }
catch (SQLException d) catch (SQLException se)
{ {
System.out.println("Exception : RecPayXfrPrc =>: Process"+ d.toString()); System.out.println("Exception : RecPayXfrPrc =>: Process"+ se.toString());
d.printStackTrace(); se.printStackTrace();
System.out.println("Exception : RecPayXfrPrc(String xmlString2, String xmlString2, String windowName, String xtraParams):"+ d.getMessage() + ":"); System.out.println("Exception : RecPayXfrPrc(String xmlString2, String xmlString2, String windowName, String xtraParams):"+ se.getMessage() + ":");
d.printStackTrace(); try{
errString = d.getMessage(); conn.rollback();
throw new ITMException(d); }catch (Exception d)
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("Exception in process ::"+ e.getMessage());
try
{
conn.rollback();
} catch (Exception d)
{ {
System.out.println("Exception : RecPayXfrPrc =>: Process"+ d.toString());
d.printStackTrace();
System.out.println("Exception : RecPayXfrPrc(String xmlString2, String xmlString2, String windowName, String xtraParams):"+ d.getMessage() + ":");
d.printStackTrace(); d.printStackTrace();
errString = d.getMessage(); errString = d.getMessage();
throw new ITMException(d); throw new ITMException(d);
} }
}
catch (Exception e)
{
System.out.println("Exception : RecPayXfrPrc =>: Process"+ e.toString());
e.printStackTrace();
System.out.println("Exception : RecPayXfrPrc(String xmlString2, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
errString = e.getMessage();
throw new ITMException(e);
} }
finally finally
{ {
......
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