Commit e96991e9 authored by smanohar's avatar smanohar

Advance posting some times the vouchdet record was not considered because of...

Advance posting some times the vouchdet record was not considered because of the code was in wrong place, move the same at top

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217332 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f0881f69
......@@ -722,6 +722,35 @@ public class VoucherConf extends ActionHandlerEJB //implements ReceiptAdvConfLoc
hAcctCdAdv = (String) VchHdrMap.get("acct_code__adv");
hCctrCdAdv = (String) VchHdrMap.get("cctr_code__adv");
tranType = (String) VchHdrMap.get("tran_type"); //added by manoharan 14-nov-2018
// 29-feb-2020 manoharan in case of advance existing vouchdet to be added to the list first, moved from below
if ("A".equals(hVouchType) && DetList.size() == 0)
{
sql = " select tran_id,line_no,acct_code,cctr_code,dept_code, anal_code,amount,proj_code from vouchdet where tran_id = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,tranId);
rs1 = pstmt1.executeQuery();
while(rs1.next())
{
detMap = new HashMap();
detMap.put("tran_id", rs1.getString("tran_id"));
detMap.put("line_no", rs1.getInt("line_no"));
detMap.put("acct_code", rs1.getString("acct_code"));
detMap.put("cctr_code",rs1.getString("cctr_code"));
detMap.put("dept_code", rs1.getString("dept_code"));
detMap.put("anal_code", rs1.getString("anal_code"));
detMap.put("amount", rs1.getDouble("amount"));
detMap.put("auto_generated", "N");
detMap.put("proj_code", rs1.getString("proj_code"));
DetList.add(detMap);
}
rs1.close();
rs1 =null;
pstmt1.close();
pstmt1 = null;
}
// 29-feb-2020 manoharan in case of advance existing vouchdet to be added to the list first
//lds_hdr.retrieve(tranId);
......@@ -1954,7 +1983,7 @@ public class VoucherConf extends ActionHandlerEJB //implements ReceiptAdvConfLoc
}
pstmt.close();
pstmt = null;
/*// 29-feb-2020 manoharan in case of advance existing vouchdet to be added to the list first, moved above
if ("A".equals(hVouchType) && DetList.size() == 0)
{
sql = " select tran_id,line_no,acct_code,cctr_code,dept_code, anal_code,amount,proj_code from vouchdet where tran_id = ?";
......@@ -1982,6 +2011,7 @@ public class VoucherConf extends ActionHandlerEJB //implements ReceiptAdvConfLoc
pstmt1 = null;
}
*/ // 29-feb-2020 manoharan in case of advance existing vouchdet to be added to the list first
/////////////////////////////end gbf_create_vou_acctdis() ////////////////////////////////////////////////////////////////////////////
......
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