Commit ba3bf74a authored by kmandhre's avatar kmandhre

change in getNoArtAList method as per PB code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94136 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 12b282e8
......@@ -5913,6 +5913,7 @@ public class DistCommon
break;
case 'I' :
/*
sql="select (case when capacity is null then 0 else capacity end) from packing "
+"where pack_code = '"+packCode+"' ";
pstmt = conn.prepareStatement(sql);
......@@ -5966,6 +5967,7 @@ public class DistCommon
liNoArt =(acQty - acQty%shipperQty)/shipperQty;
remainder = acQty%shipperQty;
}
*/
sql="select integral_qty from customeritem "
+"where cust_code = '"+custCode+"' "
+"and item_code = '"+itemCode+"'";
......@@ -6012,13 +6014,121 @@ public class DistCommon
rs.close();
rs = null;
}
if( lcIntegralQty>0 )
}
//change done by kunal on 15/jan/14 as per PB Code
if( lcIntegralQty > 0 )
liNoArt = (acQty - acQty%lcIntegralQty)/lcIntegralQty ;
break ;
case 'B' :
sql="select (case when capacity is null then 0 else capacity end) from packing "
+"where pack_code = '"+packCode+"' ";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
capacity = rs.getDouble(1);
System.out.println("capacity........"+capacity);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
sql="select reo_qty from siteitem "
+"where site_code = '"+siteCode+"' "
+"and item_code = '"+itemCode+"'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
reoQty = rs.getDouble(1);
System.out.println("reoQty........"+reoQty);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
if( reoQty==0 )
{
sql="select reo_qty from item "
+"where item_code = '"+itemCode+"' ";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
reoQty = rs.getDouble(1);
System.out.println("reoQty........"+reoQty);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
}
if(capacity > 0)
shipperQty = capacity;
else
shipperQty = reoQty;
if( shipperQty > 0 )
{
liNoArt1 =(acQty - acQty%shipperQty)/shipperQty;
remainder = acQty%shipperQty;
}
sql="select integral_qty from customeritem "
+"where cust_code = '"+custCode+"' "
+"and item_code = '"+itemCode+"'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
lcIntegralQty = rs.getDouble(1);
System.out.println("lcIntegralQty........"+lcIntegralQty);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
if(lcIntegralQty ==0)
{
sql="select integral_qty from siteitem "
+"where site_code = '"+siteCode+"' "
+"and item_code = '"+itemCode+"' ";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
lcIntegralQty = rs.getDouble(1);
System.out.println("lcIntegralQty........"+lcIntegralQty);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
if(lcIntegralQty==0)
{
sql="select (case when integral_qty is null then 0 else integral_qty end)"
+"from item where item_code = '"+itemCode+"' ";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
lcIntegralQty = rs.getDouble(1);
System.out.println("lcIntegralQty........"+lcIntegralQty);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
}
}
if( lcIntegralQty > 0 )
liNoArt2 = (remainder - remainder%lcIntegralQty)/lcIntegralQty ;
if( liNoArt2 > 0)
liNoArt2=1;
liNoArt = liNoArt1 + liNoArt2;
}
break ;
//change done by kunal on 15/jan/14 as per PB Code end
}
}
......
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