Commit 10b4ac50 authored by vkadam's avatar vkadam

Merge by C Patil. Change converted quantity for different units.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96592 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c0d4c1e8
......@@ -177,6 +177,7 @@ QCTransferConfLocal, QCTransferConfRemote
double grossRate=0;
String dimension="";
boolean isFound=false;
double noArtQCTransfer=0,netWeightQCTransfer=0;
try
{
StockUpdate stockUpdate = new StockUpdate();
......@@ -189,7 +190,8 @@ QCTransferConfLocal, QCTransferConfRemote
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, loc_code,item_code,case when dimension is null then '' else dimension end as dimension " +
" lot_sl,lot_no,porcp_no, loc_code,item_code,case when dimension is null then '' else dimension end as dimension" +
" , no_art, net_weight " + //added by cpatil on 10/10/14
" from qc_transfer where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
......@@ -207,9 +209,9 @@ QCTransferConfLocal, QCTransferConfRemote
porcpNo= rs.getString("porcp_no");
fromLoc= rs.getString("loc_code");
itemCode= rs.getString("item_code");
//noArtQCTransfer= rs.getDouble("no_art");
//netWeightQCTransfer= rs.getDouble("net_weight");
dimension=rs.getString("dimension");
noArtQCTransfer= rs.getDouble("no_art"); // remove comment by cpatil on 10/10/14
netWeightQCTransfer= rs.getDouble("net_weight"); // remove comment by cpatil on 10/10/14
}
rs.close();
......@@ -367,6 +369,7 @@ QCTransferConfLocal, QCTransferConfRemote
//if(!byprodUnit.equalsIgnoreCase(qcOrdItemUnit))
if(!qcOrderItem.equalsIgnoreCase(itemCode))
{
/* // comment this code as per suggestion of sandip
convertedQty=roundVal(dcommon.convQtyFactor(byprodUnit, qcOrdItemUnit, "X", qty, conn),3); // commented by cpatil on 05/04/14 // remove comment on 08/10/14 by cpatil
// modify by cpatil 05/04/14 start // // modify by cpatil on 09/04/14
......@@ -393,7 +396,36 @@ QCTransferConfLocal, QCTransferConfRemote
}
isByProduct=true;
//itemCode=qcOrderItem;
*/
// added by cpatil start on 10/10/14 as per suggestion and logic of sandip maurya
if(byprodUnit.equalsIgnoreCase(qcOrdItemUnit))
{
convertedQty=roundVal(dcommon.convQtyFactor(byprodUnit, qcOrdItemUnit, "X", qty, conn),3); // commented by cpatil on 05/04/14 // remove comment on 08/10/14 by cpatil
}
else
{
convertedQty = qty * qcQty / netWeight ;
}
System.out.println("@@@----qcQty order ["+qcQty+"]qty qc transfer["+qty+"]");
System.out.println("@@@@ qc order netWeight["+netWeight+"]qc transfer netWeightQCTransfer["+netWeightQCTransfer+"]");
System.out.println("@@@@ qc order noArt["+noArt+"]qc transfer noArtQCTransfer["+noArtQCTransfer+"]");
if( netWeight < netWeightQCTransfer )
{
errCode = "QCTRFNTWET"; //'QC Transfer net weight more then QC Order net weight'
return itmDBAccessLocal.getErrorString("",errCode,"");
}
if( noArt < noArtQCTransfer )
{
errCode = "QCTRFNOART"; //'QC Transfer no art more then QC Order no art'
return itmDBAccessLocal.getErrorString("",errCode,"");
}
isByProduct=true;
convertedNetWeight = netWeightQCTransfer;
convertedNoArt = noArtQCTransfer;
System.out.println("@@@@convertedQty["+convertedQty+"]convertedNetWeight["+convertedNetWeight+"]convertedNoArt["+convertedNoArt+"]");
// ended by cpatil 10/10/14
}
else
{
......@@ -405,12 +437,8 @@ QCTransferConfLocal, QCTransferConfRemote
//return errCode;//Commented by Manoj dtd 03/06/2014
}
}
}
if ( errCode == null || errCode.trim().length() == 0 )
{
cnt=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