Commit 7b53ef6c authored by prane's avatar prane

added lot_no__to in where clause @ sql where lot_no__to is populated; added to...

added lot_no__to in where clause @ sql where lot_no__to is populated; added to fetch only related pricelist lots

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213746 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af41dac9
......@@ -447,7 +447,8 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
// pstmtSql.setString(2,itemcode);
// rs = pstmtSql.executeQuery();
sql = "select lot_no__from, lot_no__to from pricelist where price_list = ? and item_code = ? "
+ " and unit = ? and list_type = ? and lot_no__from <= ? and min_qty <= ? and max_qty >= ? order by lot_no__from";
//+ " and unit = ? and list_type = ? and lot_no__from <= ? and min_qty <= ? and max_qty >= ? order by lot_no__from";
+ " and unit = ? and list_type = ? and lot_no__from <= ? and lot_no__to >= ? and min_qty <= ? and max_qty >= ? order by lot_no__from";
pstmtLot = conn.prepareStatement(sql);
for (Ctr = 0; Ctr < PricelistGen.size(); Ctr++)
......@@ -618,8 +619,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
pstmtLot.setString(3, unit);
pstmtLot.setString(4, listtype);
pstmtLot.setString(5, lotnofrom);
pstmtLot.setDouble(6, minqty);
pstmtLot.setDouble(7, maxqty);
pstmtLot.setString(6, lotnofrom);
pstmtLot.setDouble(7, minqty);
pstmtLot.setDouble(8, maxqty);
rsLot = pstmtLot.executeQuery();
if (rsLot.next())
{
......@@ -1189,7 +1191,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
pstmtSql.setDouble(7, minqty);
pstmtSql.setDouble(8, maxqty);
rs = pstmtSql.executeQuery();
if (rs.next())
while (rs.next())
{
currentlotnofr = rs.getString(1);
currentlotnoto = rs.getString(2);
......@@ -1529,11 +1531,6 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
* lotnoto=LotNoToa[temp2]+1; }
*/
}
//Added By Pavan Rane 05dec19 start[closed open cursors]
rs.close();
rs = null;
pstmtSql.close();
pstmtSql =null;
for (int i = 0; i < LotNoFroma.size(); i++)
{
lotnofr = LotNoFroma.get(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