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