Commit 249788cb authored by kmandhre's avatar kmandhre

set lot_sl on Header Screen from detail


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92009 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 836f050b
......@@ -84,6 +84,7 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
Node currDetail = null;
InvAllocTraceBean invAllocTrace = new InvAllocTraceBean();
String qcReqd = "N", lotNoDet = "";
String lotSlDet = "",itemCodeHdr = "";//added by Kunal on 19/10/12
try
{
stmt = conn.createStatement();
......@@ -96,6 +97,7 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
siteCodeReq = GenericUtility.getInstance().getColumnValueFromNode("site_code",hdrDom.item(0));
tranId = GenericUtility.getInstance().getColumnValueFromNode("tran_id",hdrDom.item(0));
qcReqd = GenericUtility.getInstance().getColumnValueFromNode("qc_reqd",hdrDom.item(0));
itemCodeHdr = GenericUtility.getInstance().getColumnValueFromNode("item_code",hdrDom.item(0));
System.out.println("\n tranId :"+tranId);
......@@ -149,9 +151,9 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
pstmt = null;
}
// 27/01/11 - Chandni Shah
if ("C".equalsIgnoreCase(backflushType))
if ("C".equalsIgnoreCase(backflushType) || "S".equalsIgnoreCase(backflushType) || "R".equalsIgnoreCase(backflushType)) //change done by Kunal on 19/10/12 add cond. for 'S' and 'R'
{
sql = " select s.mfg_date,s.exp_date,r.loc_code, r.lot_no,r.item_code from "
sql = " select s.mfg_date,s.exp_date,r.loc_code, r.lot_no,r.item_code ,r.lot_sl from "
+" receipt_backflush_det r , stock s "
+" where r.item_code = s.item_code "
+" and r.site_code = s.site_code "
......@@ -170,12 +172,15 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
locCodeDet = rs.getString ("loc_code");
lotNoDet = rs.getString ("lot_no");
itemCode = rs.getString ("item_code");
lotSlDet = rs.getString ("lot_sl"); //added by Kunal on 19/10/12
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if ("C".equalsIgnoreCase(backflushType) || "S".equalsIgnoreCase(backflushType) )//added by Kunal on 19/10/12
{
if ("Y".equals(qcReqd) )
{
......@@ -184,7 +189,7 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
sql = "select loc_code__insp from siteitem where site_code = ? and item_code = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,siteCodeReq);
pstmt.setString(2,itemCode);
pstmt.setString(2,itemCodeHdr);
rs = pstmt.executeQuery();
if (rs.next())
{
......@@ -219,13 +224,28 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
+" set mfg_date = ? , "
+" exp_date = ? , "
+" loc_code = ?, "
+ " lot_no = ? "
+ " lot_no = ? ,"
+ " lot_sl = ? " //added by Kunal on 19/10/12
+" where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,mfgDate);
pstmt.setTimestamp(2,expDate);
pstmt.setString(3,locCodeDet);
pstmt.setString(4,lotNoDet);
pstmt.setString(5,lotSlDet);
pstmt.setString(6,tranId);
}
}
else
{
sql = " update receipt_backflush "
+" set mfg_date = ? , "
+" exp_date = ? "
+" where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,mfgDate);
pstmt.setTimestamp(2,expDate);
pstmt.setString(5,tranId);
}
......@@ -249,8 +269,8 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
quantityStr = GenericUtility.getInstance().getColumnValueFromNode("quantity",currDetail);
quantity = Double.parseDouble(quantityStr);
// if (tranType.equals("I"))
// {
// if (tranType.equals("I"))
// {
if (quantity > 0)
{
......@@ -279,7 +299,7 @@ public class RcptBackFlushPos extends ValidatorEJB implements RcptBackFlushPosL
System.out.println("invAllocTrace.updateInvallocTrace : Sucessuful!");
}
}
// }
// }
}
}//try end
catch (SQLException sqx)
......
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