Commit 66ec6976 authored by rbhogale's avatar rbhogale

Changed by Rohan on converting quantity to double


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92800 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e6b10a18
......@@ -532,7 +532,7 @@ public class PickOrderIC extends ValidatorEJB implements PickOrderICLocal,PickOr
caseSize = getShipperSize(itemCode,conn);
caseQty = qty % caseSize;
if(caseQty > 0)
{
errList.add( "VTCASEQTY" );
......@@ -915,10 +915,19 @@ public class PickOrderIC extends ValidatorEJB implements PickOrderICLocal,PickOr
//Changed by Rohan to define variables.start
String itemCode = "";
String quantity = "";
//Changed by Rohan to define variables.end
/*
int caseSize = 0;
int noArt = 0;
*/
double caseSize = 0.0;
double noArt = 0.0;
//Changed by Rohan to define variables.end
//Changed by Rohan on 05-03-13 to get quantity in double.start
double qty = 0.0;
//Changed by Rohan on 05-03-13 to get quantity in double.end
//Changed by Rohan on 10-03-12 to define variable.start
String locCodeTo = "";
HashMap getTranInfo = null;
......@@ -1050,15 +1059,20 @@ public class PickOrderIC extends ValidatorEJB implements PickOrderICLocal,PickOr
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
caseSize = getShipperSize(itemCode,conn);
//Changed by Rohan on 05-03-12 to get quantity in double
/*
if(Integer.valueOf(quantity) > 0)
{
noArt = Integer.valueOf(quantity)/caseSize;
}
if(noArt < 1)
*/
if(Double.parseDouble(quantity) > 0)
{
noArt = Double.parseDouble(quantity)/caseSize;
}
if(noArt < 1.0)
{
noArt = 1;
noArt = 1.0;
}
System.out.print("No of Art"+noArt);
......@@ -1072,14 +1086,17 @@ public class PickOrderIC extends ValidatorEJB implements PickOrderICLocal,PickOr
else if( currentColumn.trim().equalsIgnoreCase("no_art" ) )
{
String noArtStr = "";
int qty = 0;
//Changed by Rohan on 05-03-12 to get quantity in double
//int qty = 0;
qty = 0.0;
noArtStr = checkNull(genericUtility.getColumnValue("no_art", dom));
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
caseSize = getShipperSize(itemCode,conn);
qty = Integer.parseInt(noArtStr) * caseSize;
//Changed by Rohan on 05-03-12 to get quantity in double
//qty = Integer.parseInt(noArtStr) * caseSize;
qty = Double.parseDouble(noArtStr) * caseSize;
System.out.print("Quantity"+qty);
......@@ -1160,12 +1177,14 @@ public class PickOrderIC extends ValidatorEJB implements PickOrderICLocal,PickOr
return updateStatus;
}
//Changed by Rohan on 10/08/12 to Check shipper size of an item.start
public int getShipperSize(String itemCode,Connection conn) throws Exception
public double getShipperSize(String itemCode,Connection conn) throws Exception
{
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
int caseSize = 0;
//Changed by Rohan on 05-03-12 to get quantity in double
//int caseSize = 0;
double caseSize = 0;
try
{
sql = "SELECT SHIPPER_SIZE FROM ITEM_LOT_PACKSIZE WHERE ITEM_CODE = ?";
......
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