Commit 3e77956c authored by ngadkari's avatar ngadkari

changes in lot no column validation

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@203677 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 55cf27ed
......@@ -2711,7 +2711,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add(childNodeName.toLowerCase());
}
}
else
//else commented by nandkumar gadkari on 18/07/19
/*else
{
sql="select count(*) from stock where site_code = ? " +
......@@ -2738,7 +2739,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}*/
}//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
{
......@@ -2787,12 +2788,27 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
if(!"N".equalsIgnoreCase(lsgenlotauto))//ADDED BY MUKESH CHAUHAN ON 05/07/19 START
{
if("M".equalsIgnoreCase(lsautogeneratelotno))
sql="select qc_reqd from siteitem where item_code = ? and site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemcode);
pstmt.setString(2, sitecode);
rs = pstmt.executeQuery();
if (rs.next())
{
sql="select qc_reqd from siteitem where item_code = ? and site_code = ?";
lsqcreqd = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemcode);
pstmt.setString(2, sitecode);
rs = pstmt.executeQuery();
if (rs.next())
{
......@@ -2802,26 +2818,14 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null;
pstmt.close();
pstmt = null;
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
sql="select (case when qc_reqd is null then 'N' else qc_reqd end) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemcode);
rs = pstmt.executeQuery();
if (rs.next())
{
lsqcreqd = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
lsqcreqd="N";
}
}
if(lsqcreqd == null || lsqcreqd.trim().length() == 0)
{
lsqcreqd="N";
}
if("M".equalsIgnoreCase(lsautogeneratelotno))
{
if(!"Y".equalsIgnoreCase(lsqcreqd))
{
if(lotno == null || lotno.trim().length() == 0)
......@@ -2850,6 +2854,40 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
else// else part added by nandkumar gadkari on 18/07/19
{
if("Y".equalsIgnoreCase(lsqcreqd))
{
if(!"Y".equalsIgnoreCase(lsautogeneratelotno))
{
if(lotno == null || lotno.trim().length() == 0)
{
itemcode = genericUtility.getColumnValue("item_code",dom);
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))
{
errCode = "VTLOTEMPTY";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
}
}
} //END
}//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
......
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