Commit 367cfb96 authored by prane's avatar prane

changes done for new lot as it was not inserted brfore calc logic

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@202312 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0f86e433
...@@ -1367,7 +1367,26 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1367,7 +1367,26 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
System.out.println("Record found@@@@@@@@@@@@@" + recordfound); System.out.println("Record found@@@@@@@@@@@@@" + recordfound);
today = new Timestamp(System.currentTimeMillis()); today = new Timestamp(System.currentTimeMillis());
ChgDate = today; ChgDate = today;
if (recordfound == false) //20jun19 start
int newCount = 0;
sql = "select count(*) from pricelist where price_list = ? and item_code = ? and unit = ? and list_type = ? and lot_no__from <= ? and lot_no__to >= ? and min_qty <= ? and max_qty >= ? order by lot_no__from";
pstmtSql = conn.prepareStatement(sql);
pstmtSql.setString(1, plist);
pstmtSql.setString(2, itemcode);
pstmtSql.setString(3, unit);
pstmtSql.setString(4, listtype);
pstmtSql.setString(5, lotnofrom);
pstmtSql.setString(6, lotnoto1);
pstmtSql.setDouble(7, minqty);
pstmtSql.setDouble(8, maxqty);
rs = pstmtSql.executeQuery();
if(rs.next())
{
newCount = rs.getInt(1);
System.out.println("Before insert new Lot Count::["+newCount+"]");
}
//20jun19 end
if (recordfound == false || newCount == 0)//if (recordfound == false)
{ {
LineNo++; LineNo++;
sql = "insert into pricelist (price_list,item_code,unit,list_type,slab_no,eff_from,valid_upto,lot_no__from,lot_no__to,min_qty,max_qty,rate,rate_type,min_rate,chg_date,chg_user,chg_term,max_rate,order_type,price_list__parent, chg_ref_no, ref_no,ref_no_old )" sql = "insert into pricelist (price_list,item_code,unit,list_type,slab_no,eff_from,valid_upto,lot_no__from,lot_no__to,min_qty,max_qty,rate,rate_type,min_rate,chg_date,chg_user,chg_term,max_rate,order_type,price_list__parent, chg_ref_no, ref_no,ref_no_old )"
......
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