Commit 0898e2b0 authored by dpawar's avatar dpawar

changes in code for pending qty


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95233 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 65da8abd
......@@ -67,11 +67,12 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
ConnDriver ConnDriver = new ConnDriver();
PreparedStatement pstmt=null;
String errString="",sql="",loginSite="",wfStatus="",itemCode="",regulatedPrice="",itemActive="";
String itmCodeDt2="",lotNo="",lotSl="", detail2xmlString="";
String itmCodeDt2="",lotNo="",lotSl="", detail2xmlString="",invoiceID="";
double aprvRate=0.0,PODrate=0.0,PODqty=0.0,allowedAmt=0.0,stockistAmt=0.0,debitNoteAmtDetail=0.0;
double debitNoteAmtHdr=0;
int updCnt=0,lineNo=0,lineNotrace=0;
ITMDBAccessEJB itmdbAccess=new ITMDBAccessEJB();
ProofOfDelivery podObj=null;
HashMap<Integer,Double> mapDebitNoteAmt=new HashMap<Integer,Double>();
try
{
......@@ -80,7 +81,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
conn = connDriver.getConnectDB("DriverValidator");
conn.setAutoCommit(false);
String confirmed="";
sql = "select confirmed,wf_status from spl_sales_por_hdr WHERE tran_id = ?";
sql = "select confirmed,wf_status,invoice_id from spl_sales_por_hdr WHERE tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
......@@ -88,6 +89,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
{
confirmed =rs.getString(1)==null ? "N":rs.getString(1);
wfStatus=rs.getString(2)==null ? "O" : rs.getString(2);
invoiceID=rs.getString(3);
}
if( pstmt != null )
{
......@@ -117,6 +119,14 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
errString = itmdbAccess.getErrorString("", "VTALCONF", "", "", conn);
return errString;
}
//check in misc_drcr_rcp POD already received or not
podObj=new ProofOfDelivery();
if(podObj.isRecordPresentInMiscDrCrRcp(conn, invoiceID))
{
errString = itmdbAccess.getErrorString("", "VTPODARI", "", "", conn);
return errString;
}
System.out.println("-------wfStatus before confirm -------"+wfStatus);
//Only submitted transaction allowed to confirm
if(wfStatus.trim().equalsIgnoreCase("S"))
......
This diff is collapsed.
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