Commit 17af2db3 authored by kshinde's avatar kshinde

Changed logic for displaying MRP in side panel.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194305 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c783bc07
......@@ -64,6 +64,7 @@ public class ItemDetails extends ValidatorEJB
if(qty!=null && qty.trim().length()>0)
{
qtyDb=Double.parseDouble(qty);
System.out.println("Inside double");
}
/*sql = "SELECT I1.ITEM_PARNT, I1.DESCR AS PARENT_DESCR, I1.PHY_ATTRIB_2, I1.PHY_ATTRIB_6, I1.PHY_ATTRIB_4, I.DESCR, " +
" (SELECT SUM(S.QUANTITY - S.ALLOC_QTY - CASE WHEN S.HOLD_QTY IS NULL THEN 0 ELSE S.HOLD_QTY END ) FROM STOCK S " +
......@@ -214,7 +215,7 @@ sql =" select m.ITEM_CODE, m.descr as PARENT_DESCR, m.unit, x.QUANTITY, x.ALLOC_
pstmt.close();
pstmt = null;
double mRate=0;
if (llPlcount >= 1) {
if (llPlcount >= 1 && (!"L".equalsIgnoreCase(lsListType))) {
sql = "select max(ref_no) as ref_no from pricelist where price_list = ? and item_code= ? and unit=? and list_type= ?"
+ " and eff_from<=? and valid_upto>=? and min_qty<=? and max_qty>=? and (ref_no is not null)";
pstmt = conn.prepareStatement(sql);
......@@ -235,10 +236,15 @@ sql =" select m.ITEM_CODE, m.descr as PARENT_DESCR, m.unit, x.QUANTITY, x.ALLOC_
pstmt.close();
pstmt = null;
mRate = distCommon.pickRateRefnoWise(lsPriceList, sdf.format(orderDate), itemCode, lsRefNo, "L", qtyDb,conn);
mRate = distCommon.pickRateRefnoWise(lsPriceList, sdf.format(orderDate), itemCode, lsRefNo, lsListType, qtyDb,conn);
System.out.println("mRate::::"+mRate);
}
else
{
mRate = distCommon.pickRateRefnoWise(lsPriceList, sdf.format(orderDate), itemCode, lsRefNo, "L", qtyDb,conn);
System.out.println("mRate::::"+mRate);
}
itemList.add(String.valueOf(mRate));
}
......
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