Commit 47328c55 authored by rbhogale's avatar rbhogale

Changed by Rohan on 26-02-13 for recipt bug fixing-no of articals


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92745 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 62bce3b6
......@@ -60,7 +60,10 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
int totOrdDet = 0;
int ordDetScaned = 0;
String asnNo="";
//Changed by Rohan on 26/02/13 for define variables.start
double sumQty=0.0;
double shipperSize = 0.0;
//Changed by Rohan on 26/02/13 for define variables.end
boolean toCommit = false, toConfirm = true;
Document dom = null;
......@@ -135,7 +138,9 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
while (it.hasNext())
{
String key =it.next();
double sumQty=0.0;
//Changed by Rohan on 26/02/13 for bug fixing
//double sumQty=0.0;
sumQty=0.0;
int length=dom.getElementsByTagName("Detail3").getLength();
System.out.println("@@@@@ length:["+length+"]");
String lineNoPOrd="";
......@@ -196,7 +201,7 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
}
/*added start*/
System.out.println("@@@@@ quantity code called--- 1-07-12");
System.out.println("@@@@@ quantity code called--- 1-07-12"+sumQty);
genericUtility = GenericUtility.getInstance();
parentNodeList = dom.getElementsByTagName("Detail3");
......@@ -263,7 +268,9 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
}
amount+=rateStduom*nquantityStduom;
//Added By Manoj dtd 31/08/2012 to update tareweight
sql="select gross_weight, net_weight, length, width ,height from item_lot_packsize WHERE ITEM_CODE = ? AND LOT_NO__FROM <= ? AND LOT_NO__TO >= ? ";
//Changed by Rohan on 26-02-13 for get shipper size
//sql="select gross_weight, net_weight, length, width ,height from item_lot_packsize WHERE ITEM_CODE = ? AND LOT_NO__FROM <= ? AND LOT_NO__TO >= ? ";
sql="select gross_weight, net_weight, length, width ,height,shipper_size from item_lot_packsize WHERE ITEM_CODE = ? AND LOT_NO__FROM <= ? AND LOT_NO__TO >= ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
if(lotNo != null && lotNo.trim().length() > 0)
......@@ -284,6 +291,8 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
{
grossWeight =rs.getDouble(1);
netWeight=rs.getDouble(2);
//Changed by Rohan on 26-02-13 for get shipper size
shipperSize = rs.getDouble("shipper_size");
}
rs.close();
rs=null;
......@@ -294,23 +303,35 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
rcpnetWeight=netWeight*noArt;
grossWeight=0;
netWeight=0;
sql="select gross_weight,net_weight from item where item_code=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs=pstmt.executeQuery();
if(rs.next())
//Changed by Rohan on 26-02-13 for 26-02-13 for considering gross weight,net weight of item master if quantity < shipper Size
if(sumQty < shipperSize)
{
grossWeight =rs.getDouble(1);
netWeight=rs.getDouble(2);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
noArt = 1;
sql="select gross_weight,net_weight from item where item_code=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs=pstmt.executeQuery();
if(rs.next())
{
grossWeight =rs.getDouble(1);
netWeight=rs.getDouble(2);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
}
//Changed by Rohan on 26/02/13 for bug fixing of calculation of weights .start
/*
rcpgrossWeight+=grossWeight*partQty;
rcpnetWeight+=netWeight*partQty;
*/
rcpgrossWeight+=grossWeight*quantity;
rcpnetWeight+=netWeight*quantity;
//Changed by Rohan on 26/02/13 for bug fixing of calculation of weights.end
rcptareWeight=rcpgrossWeight-rcpnetWeight;
System.out.println("rcpgrossWeight"+rcpgrossWeight+"rcpnetWeight"+rcpnetWeight+"rcptareWeight"+rcptareWeight);
System.out.println("@@@@@ quantityStduom:["+nquantityStduom+"] ::::convQtyStduom:["+convQtyStduom+"] ::::rateStduom:["+rateStduom+"] :::::convRtuomStduom:["+convRtuomStduom+"]");
System.out.println("@@@@@ update querry executed next");
......@@ -456,7 +477,10 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
while (it1.hasNext())
{
String key =it1.next();
double sumQty=0.0;
//Changed by Rohan on 26-02-13 for define variables
//double sumQty=0.0;
sumQty=0.0;
int length=dom.getElementsByTagName("Detail3").getLength();
System.out.println("@@@@@ length:["+length+"]");
//quantity =genericUtility.getColumnValueFromNode("quantity",dom.getElementsByTagName("Detail2").item(i));
......
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