Commit 46b28b12 authored by msalla's avatar msalla

Single payment received against multiple code.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204429 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 402fed6a
...@@ -445,7 +445,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -445,7 +445,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
ArrayList ADetList = new ArrayList(); ArrayList ADetList = new ArrayList();
ArrayList miscRcpDetList = new ArrayList(); ArrayList miscRcpDetList = new ArrayList();
PreparedStatement pstmt = null, pstmt1 = null; PreparedStatement pstmt = null, pstmt1 = null;
ResultSet rs = null; ResultSet rs = null,rs1=null;
ITMDBAccessEJB itmDBAccessEJB = null; ITMDBAccessEJB itmDBAccessEJB = null;
FinCommon finCommon = null; FinCommon finCommon = null;
DistCommon disCommon = null; DistCommon disCommon = null;
...@@ -696,36 +696,42 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -696,36 +696,42 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt = null; pstmt = null;
detListSize = DetList.size(); detListSize = DetList.size();
// } // }
//changes made by monika-22-july-2019
//sql = "select ref_ser, ref_no,adj_amt,acct_code,cctr_code,exch_rate__vouch from rcpadv where tran_id = ?"; sql = "select ref_ser,ref_no,adj_amt,acct_code,cctr_code,exch_rate__vouch from rcpadv where tran_id = ?";
//added by -monika-22-july-2019
sql = "select tran_ser,ref_no,adj_amt,cust_code,acct_code,cctr_code,exch_rate from receivables where tran_id = ?";
//end
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while(rs.next()) while(rs.next())
{ {
ADetMap = new HashMap(); ADetMap = new HashMap();
//commented by monika-22-july-2019
// ADetMap.put("ref_ser", rs.getString("ref_ser")); ADetMap.put("ref_ser", rs.getString("ref_ser"));
//changes made by monika-22-july-2019
ADetMap.put("ref_ser", rs.getString("tran_ser"));//end
ADetMap.put("ref_no", rs.getString("ref_no")); ADetMap.put("ref_no", rs.getString("ref_no"));
ADetMap.put("adj_amt", rs.getDouble("adj_amt")); ADetMap.put("adj_amt", rs.getDouble("adj_amt"));
ADetMap.put("sundry_type", "C"); ADetMap.put("sundry_type", "C");
//commented by monika-22-july-2019 //commented by monika -31-july-2019
//ADetMap.put("sundry_code", (String) RcpHdrMap.get("sundry_code")); //ADetMap.put("sundry_code", (String) RcpHdrMap.get("sundry_code"));
//changes made by monika-22-july-2019 //changes made by monika-31-july-2019
ADetMap.put("sundry_code",rs.getString("cust_code"));//end sql = "select cust_code from receivables where tran_ser=? and ref_no=?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,rs.getString("ref_ser"));
pstmt1.setString(2, rs.getString("ref_no"));
rs1= pstmt1.executeQuery();
if(rs.next())
{
ADetMap.put("sundry_code",rs.getString("cust_code"));
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
//end
ADetMap.put("acct_code", rs.getString("acct_code")); ADetMap.put("acct_code", rs.getString("acct_code"));
ADetMap.put("cctr_code", rs.getString("cctr_code")); ADetMap.put("cctr_code", rs.getString("cctr_code"));
//commented by monika-22-july-2019 ADetMap.put("exch_rate__vouch", rs.getDouble("exch_rate__vouch"));
//ADetMap.put("exch_rate__vouch", rs.getDouble("exch_rate__vouch"));
//changes made by monika-22-july-2019
ADetMap.put("exch_rate__vouch", rs.getDouble("exch_rate"));//end
ADetList.add(ADetMap); ADetList.add(ADetMap);
System.out.println(" receipt Adv Map.........."); System.out.println("receipt Adv Map..........");
System.out.println(ADetMap.toString()); System.out.println(ADetMap.toString());
} }
rs.close(); rs.close();
......
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