Commit 72261dff authored by jshinde's avatar jshinde

Request Id:W15HSUN003,pallet request with stock details.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99211 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 94678800
......@@ -883,7 +883,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
String siteCode = "",lotNo="",lotSl="",itemCode="",palletNo="",noArtStr="",quantityStr="";
int currentFormNo = 0;
ResultSet rs=null;
double quantity=0,noArt=0,qtyPerArt,noArtQuot=0,noArtRem =0 , notArt = 0, totalQuantity = 0, noArtD=0;
double quantity=0,noArt=0,qtyPerArt=0,noArtQuot=0,noArtRem =0 , notArt = 0, totalQuantity = 0, noArtD=0;
System.out.println("xtraParams=["+xtraParams+"]");
GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -1042,8 +1042,8 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
}
else
{
valueXmlString.append( "<quantity><![CDATA[" ).append( "" ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( "" ).append( "]]></no_art>\r\n" );
valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
}
rs.close();
pstmt.close();
......@@ -1075,6 +1075,9 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
if(rs.next())
{
qtyPerArt = rs.getDouble("QTY_PER_ART");
}
rs.close();
pstmt.close();
noArtQuot= quantity / qtyPerArt ;
noArtRem = quantity % qtyPerArt ;
......@@ -1091,10 +1094,20 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
if(quantity <= 0)
{
valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<lot_sl><![CDATA[" ).append( " " ).append( "]]></lot_sl>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
}
else
{
valueXmlString.append( "<no_art><![CDATA[" ).append( noArt ).append( "]]></no_art>\r\n" );
}
rs.close();
pstmt.close();
}
else if( currentColumn.trim().equalsIgnoreCase( "no_art" ) )
{
......@@ -1126,16 +1139,27 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{
qtyPerArt = rs.getDouble("QTY_PER_ART");
}
rs.close();
pstmt.close();
quantity = noArtD* qtyPerArt ;
System.out.println( "noArt>>>>>>>::"+noArt);
System.out.println( "noArtD>>>>>>>::"+noArtD);
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
if(noArtD <= 0)
{
valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<lot_sl><![CDATA[" ).append( " " ).append( "]]></lot_sl>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
}
else
{
valueXmlString.append( "<quantity><![CDATA[" ).append( quantity ).append( "]]></quantity>\r\n" );
}
rs.close();
pstmt.close();
}
valueXmlString.append( "</Detail2>\r\n" );
......
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