Commit 3c5e920c authored by vvengurlekar's avatar vvengurlekar

PoReceiptIc.java - lot no mandatory if use_supplier_lot is Y and stk_opt in item master is 2


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192521 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a044af88
......@@ -2569,7 +2569,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}//end case loc code
if (childNodeName.equalsIgnoreCase("lot_no"))
{
String lotno="",lotnoType="",itemcode="",lsstkopt="",lssitecode="",lsloccode="";
String lotno="",lotnoType="",itemcode="",lsstkopt="",lssitecode="",lsloccode="", suppCode = "", useSuppLot = "";
lotno = genericUtility.getColumnValue("lot_no", dom);
lotnoType = discommon.getDisparams("999999", "PO_RECEIPT_LOT", conn);
System.out.println("lotnoType"+lotnoType);
......@@ -2599,9 +2599,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errCode = "VTLOTEMPTY";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
else
{
......@@ -2635,8 +2634,54 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}//Added else block by Varsha V on 30-10-18 if stkopt is 2 and use_supplier_lot is Y the lot_no is mandatory
else
{
suppCode = checkNull(genericUtility.getColumnValue("supp_code", dom1));
itemcode = checkNull(genericUtility.getColumnValue("item_code",dom));
if(lotno == null || lotno.trim().length() == 0)
{
lsstkopt = "";
sql="select stk_opt from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsstkopt = rs.getString(1);
}
}
System.out.println("lsstkopt**********-->"+lsstkopt);
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if("2".equalsIgnoreCase(lsstkopt))
{
useSuppLot = "";
sql = "SELECT (CASE WHEN USE_SUPPLIER_LOT IS NULL THEN 'N' ELSE USE_SUPPLIER_LOT END) AS USE_SUPPLIER_LOT FROM SUPPLIER WHERE SUPP_CODE= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, suppCode);
rs = pstmt.executeQuery();
if (rs.next())
{
useSuppLot = checkNull(rs.getString("USE_SUPPLIER_LOT"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println(">>>>>>>>>>>>>useSuppLot:" + useSuppLot);
if("Y".equalsIgnoreCase(useSuppLot))
{
errCode = "VTLOTEMPTY";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
}//Ended else block by Varsha V on 30-10-18 if stkopt is 2 and use_supplier_lot is Y the lot_no is mandatory
}// end lot no case
if (childNodeName.equalsIgnoreCase("acct_code__dr"))
{
......
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