Commit 3ff10216 authored by mkhan's avatar mkhan

changes for to close result and remvoe null pointer excp


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91122 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3987d395
...@@ -643,6 +643,8 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal, ...@@ -643,6 +643,8 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal,
{ {
liCnt = rs.getInt(1); liCnt = rs.getInt(1);
} }
rs.close();
rs=null;
System.out.println("liCnt:"+liCnt+":"); System.out.println("liCnt:"+liCnt+":");
// to note the location not in gencodes // to note the location not in gencodes
if(liCnt == 0) if(liCnt == 0)
...@@ -666,6 +668,9 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal, ...@@ -666,6 +668,9 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal,
{ {
avail = rs.getString(1); avail = rs.getString(1);
} }
rs.close();
rs=null;
available = genericUtility.getColumnValue("avaliable_yn",dom1); available = genericUtility.getColumnValue("avaliable_yn",dom1);
System.out.println("avail:"+avail+":available:"+available); System.out.println("avail:"+avail+":available:"+available);
if (available == null) if (available == null)
...@@ -684,7 +689,7 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal, ...@@ -684,7 +689,7 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal,
} }
totCnt++; totCnt++;
} //end stToken } //end stToken
rs.close(); //rs.close(); comment by manazir on 30-05-09
rs=null; rs=null;
pstmtGen.close(); pstmtGen.close();
pstmtGen=null; pstmtGen=null;
...@@ -784,11 +789,19 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal, ...@@ -784,11 +789,19 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal,
} }
else else
{ {
rateDec = distComm.pickRate( priceList,orderDate,itemCode,"","L",conn); priceListType = distComm.getPriceListType(priceList,conn); // ls_type
if(("B".equalsIgnoreCase(priceListType)) )
{
rateDec = 0;
}
else
{
rateDec = distComm.pickRate( priceList,orderDate,itemCode,"","L",conn);
}
// System.out.println("Return From pickRate[: "+rateDec+" :]"); // System.out.println("Return From pickRate[: "+rateDec+" :]");
} }
//System.out.println("[[[[[[ CALL getPriceListType[[[[[["+priceList); //System.out.println("[[[[[[ CALL getPriceListType[[[[[["+priceList);
priceListType = distComm.getPriceListType(priceList,conn); // ls_type
//System.out.println("[[[[[[ CALL END getPriceListType[[[[[["+priceListType); //System.out.println("[[[[[[ CALL END getPriceListType[[[[[["+priceListType);
//System.out.println("Return From getPriceListType[: "+priceListType+" :]"); //System.out.println("Return From getPriceListType[: "+priceListType+" :]");
if(!("L".equalsIgnoreCase(priceListType)) && rateDec < 0 ) if(!("L".equalsIgnoreCase(priceListType)) && rateDec < 0 )
...@@ -804,7 +817,15 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal, ...@@ -804,7 +817,15 @@ public class DissOrderDmgPrc extends ProcessEJB implements DissOrderDmgPrcLocal,
} }
else else
{ {
rateClgDec = distComm.pickRate( priceListClg,orderDate,itemCode,"","L",conn); priceListType = distComm.getPriceListType(priceListClg,conn); // ls_type
if(("B".equalsIgnoreCase(priceListType)) )
{
rateClgDec = 0;
}
else
{
rateClgDec = distComm.pickRate( priceListClg,orderDate,itemCode,"","L",conn);
}
//System.out.println("Return From pickRate[: "+rateClgDec+" :]"); //System.out.println("Return From pickRate[: "+rateClgDec+" :]");
} }
if(rateClgDec == -1) if(rateClgDec == -1)
......
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