Commit 59aafa24 authored by mchauhan's avatar mchauhan

Bug fix

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@203513 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 63951d08
......@@ -2643,19 +2643,18 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}//end case loc code
if (childNodeName.equalsIgnoreCase("lot_no"))
{
String lotno="",lotnoType="",itemcode="",lsstkopt="",lssitecode="",lsloccode="", suppCode = "", useSuppLot = "";
//added by-MUKESH CHAUHAN ON 05/07/19 START
String lotno="",lotnoType="",itemcode="",lsstkopt="", suppCode = "", useSuppLot = "";
//ADDED BY MUKESH CHAUHAN ON 05/07/19 START
String lsitemser="", lsgenlotauto="",lsqcreqd="",lsautogeneratelotno="",lsdis="",lssite="";
//end
//END
lotno = genericUtility.getColumnValue("lot_no", dom);
lotnoType = discommon.getDisparams("999999", "PO_RECEIPT_LOT", conn);
System.out.println("lotnoType"+lotnoType);
//added by-MUKESH CHAUHAN ON 05/07/19 START
System.out.println("lotnoType>>>>>>>>>>>"+lotnoType);
itemcode = genericUtility.getColumnValue("item_code",dom);
lsautogeneratelotno =discommon.getDisparams("999999","GENERATE_LOT_NO_AUTO", conn);
sitecode = checkNull(genericUtility.getColumnValue("site_code", dom1));
......@@ -2687,17 +2686,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null;
pstmt.close();
pstmt = null;
//commented by-MUKESH CHAUHAN ON 05/07/19
//if(!"A".equalsIgnoreCase(lotnoType))
//added by MUKESH CHAUHAN ON 05/07/19
if(!"A".equalsIgnoreCase(lotnoType) || "N".equalsIgnoreCase(lsgenlotauto))//end
if(!"A".equalsIgnoreCase(lotnoType) || "N".equalsIgnoreCase(lsgenlotauto))
{
//removed trim function by Varsha V for allowing space
//if(lotno == null || lotno.trim().length() == 0)
if(lotno == null || lotno.length() == 0)
if(lotno == null || lotno.trim().length() == 0) //END
{
itemcode = genericUtility.getColumnValue("item_code",dom);
sql="select stk_opt from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemcode);
......@@ -2718,19 +2710,16 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
else
{
lssitecode = genericUtility.getColumnValue("site_code",dom1);
lsitemcode = genericUtility.getColumnValue("item_code",dom);
lsloccode = genericUtility.getColumnValue("loc_code",dom);
sql="select count(*) from stock where site_code = ? " +
"and item_code = ? and loc_code = ? and lot_no =?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lssitecode);
pstmt.setString(2, lsitemcode);
pstmt.setString(3, lsloccode);
pstmt.setString(1, sitecode);
pstmt.setString(2, itemcode);
pstmt.setString(3, loccode);
pstmt.setString(4, lotno);
rs = pstmt.executeQuery();
if (rs.next())
......@@ -2748,15 +2737,12 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errCode = "VTNEWLOT";
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
{
suppCode = checkNull(genericUtility.getColumnValue("supp_code", dom1));
itemcode = checkNull(genericUtility.getColumnValue("item_code",dom));
if(lotno == null || lotno.trim().length() == 0)
{
lsstkopt = "";
......@@ -2799,8 +2785,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
//added by BY MUKESH CHAUHAN ON 05/07/19 START
if(!"N".equalsIgnoreCase(lsgenlotauto))
if(!"N".equalsIgnoreCase(lsgenlotauto))//ADDED BY MUKESH CHAUHAN ON 05/07/19 START
{
if("M".equalsIgnoreCase(lsautogeneratelotno))
{
......@@ -2865,8 +2850,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
}//end
} //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
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