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