Commit f41e4d74 authored by cpatil's avatar cpatil

modify for convqty


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94503 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 04d8c733
...@@ -167,7 +167,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -167,7 +167,7 @@ QCTransferConfLocal, QCTransferConfRemote
Timestamp qcOrderDate = null,newQCOrderDate=null; // added by cpatil on 02/11/13 Timestamp qcOrderDate = null,newQCOrderDate=null; // added by cpatil on 02/11/13
String qcOrderItem=""; String qcOrderItem="";
String qcOrdItemUnit="",byprodUnit=""; String qcOrdItemUnit="",byprodUnit="";
double convertedQty=0; double convertedQty=0,netWeight=0;
boolean isByProduct=false; boolean isByProduct=false;
try try
...@@ -182,7 +182,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -182,7 +182,7 @@ QCTransferConfLocal, QCTransferConfRemote
sysDate= Timestamp.valueOf(genericUtility.getValidDateString(sysDateStr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); sysDate= Timestamp.valueOf(genericUtility.getValidDateString(sysDateStr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
sql = " Select confirmed, qorder_no, tran_date ,site_code,loc_code__trf,quantity,lot_sl,lot_no,porcp_no," + sql = " Select confirmed, qorder_no, tran_date ,site_code,loc_code__trf,quantity,lot_sl,lot_no,porcp_no," +
" loc_code,item_code" + " loc_code,item_code " +
" from qc_transfer where tran_id = ? "; " from qc_transfer where tran_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
...@@ -200,6 +200,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -200,6 +200,7 @@ QCTransferConfLocal, QCTransferConfRemote
porcpNo= rs.getString("porcp_no"); porcpNo= rs.getString("porcp_no");
fromLoc= rs.getString("loc_code"); fromLoc= rs.getString("loc_code");
itemCode= rs.getString("item_code"); itemCode= rs.getString("item_code");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -207,7 +208,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -207,7 +208,7 @@ QCTransferConfLocal, QCTransferConfRemote
pstmt = null; pstmt = null;
sql = " Select status,Quantity,item_code from qc_order where qorder_no = ? "; sql = " Select status,Quantity, item_code, net_weight from qc_order where qorder_no = ? "; // added net_weight by cpatil on 05/04/14
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, qorderNo); pstmt.setString(1, qorderNo);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -217,7 +218,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -217,7 +218,7 @@ QCTransferConfLocal, QCTransferConfRemote
status = rs.getString("status"); status = rs.getString("status");
qcQty= rs.getDouble("Quantity"); qcQty= rs.getDouble("Quantity");
qcOrderItem= rs.getString("item_code"); qcOrderItem= rs.getString("item_code");
netWeight= rs.getDouble("net_weight");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -350,7 +351,16 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -350,7 +351,16 @@ QCTransferConfLocal, QCTransferConfRemote
//if(!byprodUnit.equalsIgnoreCase(qcOrdItemUnit)) //if(!byprodUnit.equalsIgnoreCase(qcOrdItemUnit))
if(!qcOrderItem.equalsIgnoreCase(itemCode)) if(!qcOrderItem.equalsIgnoreCase(itemCode))
{ {
convertedQty=roundVal(dcommon.convQtyFactor(byprodUnit, qcOrdItemUnit, "X", qty, conn),3); //convertedQty=roundVal(dcommon.convQtyFactor(byprodUnit, qcOrdItemUnit, "X", qty, conn),3); // commented by cpatil on 05/04/14
// modify by cpatil 05/04/14 start
System.out.println("@@@@ qc order Qty[qcQty]["+qcQty+"]qc transfer qty[qty]["+qty+"]netWeight["+netWeight+"]");
convertedQty = qcQty * qty / netWeight ;
System.out.println("@@@@convertedQty["+convertedQty+"]");
//// cpatil end
System.out.println("convertedQty-----"+convertedQty); System.out.println("convertedQty-----"+convertedQty);
if(qcQty < convertedQty ) if(qcQty < convertedQty )
{ {
......
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