Commit 35581498 authored by caluka's avatar caluka

Transfer full quantity time lot no and location update logic change


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97109 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4115d2d1
......@@ -3076,7 +3076,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
PreparedStatement pstmt=null, pstmtUpd=null,pstmtInsert = null,pstmtQC=null;
String lotNo="",itemCode="",siteCode="",locationCode="",lotSl="",qorderNo="",locationCodeFrom="";
String unit="",aprv="",rej="",qcLotLocCode="";
int cnt=0,cnt1=0,updCnt=0,updCnt1=0;
int cnt=0,cnt1=0,updCnt=0,updCnt1=0,cnt22=0;
double quantity=0,qtySample=0,qcOrdQty=0;
double noArt=0 , netWeight=0 , rate=0 , batchSize=0;
int lineNo=0,qcCount=0,qcLotCount=0;
......@@ -3192,25 +3192,30 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
if (rs.next())
{
//cnt22 = rs.getInt("cnt");
cnt22 = Integer.parseInt(rs.getString("cnt") == null ? "0" : rs.getString("cnt"));
qcOrdQty = Double.parseDouble(rs.getString("quantity") == null ? "0" : rs.getString("quantity"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(qcOrdQty == 0)
if(cnt22 > 0)
{
sql = " delete from qc_order_lots where item_code = ? and lot_no = ? " +
"and loc_code__issue = ? and lot_sl=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, lotNo);
pstmt.setString(3, locationCodeFrom);
pstmt.setString(4, lotSl);
pstmt.executeUpdate();
pstmt.close();
pstmt = null;
if (qcOrdQty == 0)
{
sql = " delete from qc_order_lots where item_code = ? and lot_no = ? "
+ "and loc_code__issue = ? and lot_sl=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, lotNo);
pstmt.setString(3, locationCodeFrom);
pstmt.setString(4, lotSl);
pstmt.executeUpdate();
pstmt.close();
pstmt = null;
}
}
}
else
......
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