Commit 36d99c13 authored by caluka's avatar caluka

GL TRACE credit /debit analysis parameters split '@' condition


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101730 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 47cbe1bb
......@@ -468,7 +468,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
String lineNo = "", itemCode = "" ,unit = "", locCode = "",lotNo = "",lotSl = "",acctCodeCr = "";
String acctCodeDr = "",cctrCodeCr = "",cctrCodeDr ="",grade ="",packCode = "",siteCodeMfg = "";
String unitAlt = "",convQtyStduom = "",itemSer = "",invStat = "",batchNo = "";
String errCode = "",dimension = "";
String errCode = "",dimension = "",lineNoPost="";
int itemCnt = 0,hdrCnt =0;
double quantity =0.0,rate =0.0,grossWeight=0.0,tareWeight=0.0,netWeight=0.0,noArt=0.0,grossRate = 0.0,potencyPerc =0.0;
double stkBefQty =0.0,stkAfterQty = 0.0;
......@@ -538,7 +538,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
convQtyStduom = rs.getString("conv__qty_stduom");
batchNo = rs.getString("batch_no");
retestDate = rs.getTimestamp("retest_date");
lineNoPost=lineNo;
sql1 = "select (case when quantity is null then 0 else quantity end) as befqty from stock where item_code=? " +
" and site_code =? and loc_code =? and lot_no =? and lot_sl =? ";
......@@ -676,7 +676,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
{
return errCode;
}
errCode =invAdjPost(tranId, rate, refSer, lineNo,conn);
errCode =invAdjPost(tranId, rate, refSer, lineNoPost,conn);
if(errCode !=null && errCode.trim().length() >0)
{
return errCode;
......@@ -725,6 +725,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
HashMap gltraceMap = new HashMap();
try
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
if(refSer.equals("ADJISS"))
{
......@@ -825,7 +826,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
lineNoInt=0;
}
sql = "select a.tran_date, a.eff_date,a.ref_ser,a.site_code,b.quantity,b.acct_code__dr," +
sql = "select b.item_code,a.tran_date, a.eff_date,a.ref_ser,a.site_code,b.quantity,b.acct_code__dr," +
" b.cctr_code__dr, b.acct_code__cr,b.cctr_code__cr, a.tran_id, b.item_code ,a.tran_type,b.rate from " +
" adj_issrcp a, adj_issrcpdet b where a.tran_id = b.tran_id and a.tran_id = ? and b.line_no = ?";
pstmt = conn.prepareStatement(sql);
......@@ -834,7 +835,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
rs = pstmt.executeQuery();
while (rs.next())
{
tranDateStr = rs.getString("tran_date");
tranDate = rs.getTimestamp("tran_date");
effDate = rs.getTimestamp("eff_date");
refSer = rs.getString("ref_ser");
siteCode = rs.getString("site_code");
......@@ -846,11 +847,14 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
refId = rs.getString("tran_id");
tranType = rs.getString("tran_type");
rateDet = rs.getDouble("rate");
if(tranDateStr != null && tranDateStr.trim().length() >0)
itemCode = rs.getString("item_code");
/*if(tranDateStr != null && tranDateStr.trim().length() >0)
{
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
}*/
tranDateStr = simpleDateFormat.format(tranDate);
System.out.println("tranDateStr@@@@@@@@@"+tranDateStr);
sql1 = "select site_type from site where site_code = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, siteCode);
......@@ -892,7 +896,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
errCode = itmDBAccessLocal.getErrorString("", "VMFINENT", "");
return errCode;
}
sql1 = "select curr_code into from finent where fin_entity = ? ";
sql1 = "select curr_code from finent where fin_entity = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, finEntity);
rs1 = pstmt1.executeQuery();
......@@ -952,6 +956,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
return errCode;
}
amount=quantity*rate;
System.out.println("AMOUNT>>>>"+amount);
if(amount !=0)
{
gltraceMap.put("tran_date",tranDate);
......@@ -985,7 +990,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
analysis = invAcctObj.AcctAnalysisType(itemCode, refSer, tranType, "CR", conn);
if(analysis.trim().length() >0)
{
String[] arrStr =analysis.split(",");
String[] arrStr =analysis.split("@");
if(arrStr.length>0)
{
analysis1 =arrStr[0];
......@@ -1037,7 +1042,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
analysis = invAcctObj.AcctAnalysisType(itemCode, refSer, tranType, "DR", conn);
if(analysis.trim().length() >0)
{
String[] arrStr =analysis.split(",");
String[] arrStr =analysis.split("@");
if(arrStr.length>0)
{
analysis1 =arrStr[0];
......
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