Commit da00aeb0 authored by pshinde's avatar pshinde

During QC Transfer Confirmation, If auto_reqc = Y and Available =Y then...

During QC Transfer Confirmation, If auto_reqc = Y and Available =Y then retest_date will get set, otherwise it will set null.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98787 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9ed2ec05
......@@ -218,6 +218,8 @@ QCTransferConfLocal, QCTransferConfRemote
String strToWrite="";
boolean isQcFlag=false;
double remainingQcOrderQty=0.0, QcTransferQty=0.0,qcQtyPassed=0.0;
String usable="";
String autoReqc="";
try
{
StockUpdate stockUpdate = new StockUpdate();
......@@ -352,7 +354,7 @@ QCTransferConfLocal, QCTransferConfRemote
if (toLoc != null)
{
sql = " Select Available from location a, invstat b "
sql = " Select Available,b.usable from location a, invstat b "
+ " Where a.loc_code = ? and a.inv_stat = b.inv_stat ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, toLoc);
......@@ -360,6 +362,7 @@ QCTransferConfLocal, QCTransferConfRemote
if (rs.next())
{
available = rs.getString("available");
usable = rs.getString("usable");
}
rs.close();
rs = null;
......@@ -418,6 +421,43 @@ QCTransferConfLocal, QCTransferConfRemote
///added by cpatil on 12/12/13 for date validation with approval lead time end
//added by Priyanka Shinde on 16/10/15
//to get auto_reqc from siteitem or item
sql=" select auto_reqc from siteitem where site_code= ? and item_code= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode);
pstmt.setString(2, itemCode);
rs = pstmt.executeQuery();
if (rs.next())
{
autoReqc= rs.getString("auto_reqc");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("autoReqc from siteitem ========="+autoReqc);
if(autoReqc==null||autoReqc.trim().length()==0)
{
sql=" select auto_reqc from item where item_code= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
if (rs.next())
{
autoReqc= rs.getString("auto_reqc");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("autoReqc from item ========="+autoReqc);
}
System.out.println("autoReqc ========="+autoReqc);
//ended by Priyanka Shinde on 16/10/15
if( errCode == null || errCode.trim().length() == 0 )
{
sql = " Select quantity from qc_order where qorder_no = ? ";
......@@ -562,7 +602,20 @@ QCTransferConfLocal, QCTransferConfRemote
stockUpd.put("item_ser",rs.getString("item_ser"));
stockUpd.put("mfg_date", rs.getTimestamp("mfg_date"));
stockUpd.put("exp_date", rs.getTimestamp("exp_date"));
stockUpd.put("retest_date", rs.getTimestamp("retest_date"));
//Added by priyanka shinde on 16/10/15
// If auto_reqc = Y and Available =y then retest_date will get set, otherwise it will set null,
if("Y".equalsIgnoreCase(available) && "Y".equalsIgnoreCase(autoReqc))
{
System.out.println("******Y.equalsIgnoreCase(available) && Y.equalsIgnoreCase(usable)******");
stockUpd.put("retest_date", rs.getTimestamp("retest_date"));
}
else
{
System.out.println("else=**********");
stockUpd.put("retest_date", null);
}
//ended by priyanka shinde on 16/10/15
stockUpd.put("site_code__mfg", rs.getString("site_code__mfg"));
stockUpd.put("potency_perc", rs.getString("potency_perc"));
stockUpd.put("pack_code", rs.getString("pack_code"));
......@@ -593,12 +646,14 @@ QCTransferConfLocal, QCTransferConfRemote
stockQty = rs.getDouble("quantity");
rate=rs.getDouble("rate");
grossRate=rs.getDouble("gross_rate");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("stockUpd Map===="+stockUpd);
if( cnt == 0 )
{
errCode = "QCTRFSTK"; //'Item Not Found in Stock...'
......
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