Commit d142a335 authored by msalla's avatar msalla

Unconfirmed PDC unable to edit

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208943 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fe0b8d16
......@@ -280,10 +280,10 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
amt=0;
}
// for ref no duplicate value check--
if(refNo!= null && refNo.trim().length() > 0)
/*
if(refNo == null && refNo.trim().length() == 0)
{ //COMMENETD BY MONIKA 03-10-2019 TO CHECK REF NO
//System.out.println("enter ref no is 1"+refNo);
*/ //System.out.println("enter ref no is 1"+refNo);
/*sql = "select count(*) from pdc_received where ref_no=? and status not in ('X','P')";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,refNo);
......@@ -303,9 +303,9 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{*///commented by monika
//Added by monika 3 oct 2019 TO CHECK DUPLICATE REF_NO REF NO
//sql = "select tran_id from receipt where ref_no=? and confirmed='Y'";
if(tranid != null && tranid.trim().length() > 0)
/*if(tranid != null && tranid.trim().length() > 0)
{
sql = "select tran_id from receipt where cust_code=? and ref_no=? and confirmed='Y'";
*/ sql = "select tran_id from receipt where cust_code=? and ref_no=? and confirmed='Y'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
pstmt.setString(2, refNo);
......@@ -320,9 +320,11 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
pstmt.close();
pstmt = null;
// System.out.println("@V@ Tran id receipt :- ["+tranIdRcp+"]");
System.out.println("@V@ Tran id receipt :- ["+tranIdRcp+"]");
// System.out.println("enter ref no is 1"+refNo);
System.out.println("enter ref no is 1"+refNo);
if(tranIdRcp != null && tranIdRcp.trim().length() > 0)
{
sql = "select count(*) from rcpdishnr where receipt_no=? and tran_ser='R'";
pstmt = conn.prepareStatement(sql);
// pstmt.setString(1, tranid);
......@@ -332,7 +334,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{
cnt = rs.getInt(1);
}
// System.out.println("@V@ pdc_received no count11:- [" + cnt + "]");
System.out.println("@V@ pdc_received no count11:- [" + cnt + "]");
rs.close();
rs = null;
......@@ -371,7 +373,6 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
rs = null;
pstmt.close();
pstmt = null;
// System.out.println("@V@ pdc_received no count22:- [" + cnt + "]");
if(cnt > 0)
{
......@@ -381,7 +382,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
errFields.add(childNodeName.toLowerCase());
}
}//closing of tran_id if condition
}//closing is ref_no condition
}
......@@ -1025,8 +1026,8 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
}
}// end of finally statement
return errStringXml.toString();
}
public String itemChanged(String xmlString, String xmlString1, String objContext,
}
public String itemChanged(String xmlString, String xmlString1, String objContext,
String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException {
String errString = "";
Document dom = null;
......@@ -1049,11 +1050,11 @@ public String itemChanged(String xmlString, String xmlString1, String objContext
e.getMessage();
}
return retString;
}
}
public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn,
public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn,
String editFlag, String xtraParams) throws RemoteException, ITMException
{
{
Connection conn = null;
// Added by sarita on 01/06/2017
ConnDriver connDriver = null;
......@@ -1722,9 +1723,9 @@ public String itemChanged(Document dom, Document dom1, String objContext, String
}
}
return valueXmlString.toString();
}
}
private String errorType(Connection conn, String errorCode) throws ITMException {
private String errorType(Connection conn, String errorCode) throws ITMException {
String msgType = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -1762,13 +1763,13 @@ private String errorType(Connection conn, String errorCode) throws ITMException
}
}
return msgType;
}
}
private double checkDouble(String input) {
private double checkDouble(String input) {
if (input == null || input.trim().length() == 0) {
return 0;
} else {
return Double.parseDouble(input);
}
}
}
}
\ No newline at end of file
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