Commit 9d5b2a08 authored by mmhatre's avatar mmhatre

changes for show the data in credit note 3rd form when sales return confirm.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216041 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e7b0d67
......@@ -31,6 +31,8 @@ import java.text.*;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
import com.itextpdf.text.pdf.hyphenation.TernaryTree.Iterator;
@Stateless
......@@ -287,7 +289,8 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr
String invoiceIDHdr = "", tranIDDrcrRcp = "",tranSer = "",winName = "",ledgPostConf = "",errCode = "",acctCode = "",cctrCode= "",
posType = "",itemSer = "",acctCodeSal = "",cctrCodeSal = "",cctrCodeAr = "",acctReco = "",cctrReco = "",acctRnd = "",cctrRnd = "",
tranType = "",invType = "",lineNo = "",taxAmt = "",itemCode = "",lsStr = "",custCode = "",refNo = "",refSer = "",roundOff = "";
int maxline=0,detListSize=0; //added by manish mhatre on 31-jan-2020
String empCode="",analCode="",analysis1="",analysis2="",analysis3="";//added by manish mhatre on 31-jan-2020
try
{
//System.out.println("Inside gbfRetrieveDrCrRcp.....tranId["+tranId+"] siteCode["+siteCode+"] connection 55"+conn);
......@@ -1119,7 +1122,8 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr
detMap.put("emp_code", "");
detMap.put("anal_code", "");
detailList.set(Integer.valueOf(lineNo), detMap);
//detailList.set(Integer.valueOf(lineNo), detMap); //commented by manish mhatre
detailList.add(detMap); //added by manish mhatre on 31-jan-2020 [For coin diff issue in salesreturn confirm]
}
//System.out.println("inside while loop ["+amount+"]");
......@@ -1316,7 +1320,61 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr
return errCode;
}
}
//added by manish mhatre on 31-jan-2020
//start manish
System.out.println("tran id.....>>>>>>>>"+tranId);
sql = "select max(line_no) from DRCR_RACCT where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
maxline = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Max Line>>>"+maxline);
detListSize=detailList.size();
sql="Insert into DRCR_RACCT (tran_id,line_no,acct_code,cctr_code,amount,emp_code,anal_code) values (?,?,?,?,?,?,?)";
pstmt = conn.prepareStatement(sql);
for(i = 0 ; i<detailList.size() ; i++)
{
maxline++;
detMap = (HashMap) detailList.get(i);
tranId = (String) detMap.get("tran_id");
//lineNo = (String) detMap.get("line_no");
acctCode = (String) detMap.get("acct_code");
cctrCode = (String) detMap.get("cctr_code");
amount = (double) Double.parseDouble( "" +detMap.get("amount"));
empCode = (String) detMap.get("emp_code");
analCode = (String) detMap.get("anal_code");
pstmt.setString(1,tranId);
pstmt.setInt(2,maxline);
pstmt.setString(3,acctCode);
pstmt.setString(4,cctrCode==null?"":cctrCode);
pstmt.setDouble(5,amount);
pstmt.setString(6,empCode);
pstmt.setString(7,analCode);
pstmt.addBatch();
pstmt.clearParameters();
}
if (detailList.size() > 0)
{
pstmt.executeBatch();
}
pstmt.close();
pstmt = null;
//end manish
errCode = postDrCrRcp(tranId, hdrMap, detailList, adjList, xtraParams, conn);
}
}
......
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