Commit df7feb4c authored by pshinde's avatar pshinde

Validation for lotNoFrom and lotNoTo ie lotNoFrom and lotNoTo should be same,if not shows error


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95957 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9a9a0646
......@@ -209,6 +209,8 @@ public String wfValData(Document dom, Document dom1,Document dom2, String objCon
String invHoldLine="";
int unconfInvHoldCnt=0;
int unconfInvRelCnt=0;
String allowMultipleLot="";// added by priyanka on 19/8/14
DistCommon distCommon=new DistCommon();// added by priyanka on 19/8/14
try
{
......@@ -318,6 +320,30 @@ public String wfValData(Document dom, Document dom1,Document dom2, String objCon
errFields.add("lot_no__from");
}
System.out.println("Checking 1111111111");
/// added by priyanka as per manoj sharma instruction on 19/08/14
// validation for lotNo From and LotNoTo
//if LotNoFrom and LotNoTo are not equal then it will show error
allowMultipleLot = checkNull(distCommon.getDisparams("999999", "ALLOW_MULTIPLE_LOT", conn));
System.out.println("allowMultipleLot="+allowMultipleLot);
if(allowMultipleLot == null || allowMultipleLot.trim().equalsIgnoreCase("NULLFOUND"))
{
allowMultipleLot = "N";
}
if(allowMultipleLot.equalsIgnoreCase("N"))
{
if(!lotNoFrom.equalsIgnoreCase(lotNoTo))
{
System.out.println("lotNoFrom and LotNoTo should be same");
errCode = "VMLOTFRTO ";
errList.add(errCode);
errFields.add("lot_no__from");
}
}
System.out.println("Displaying -----------------");
System.out.println("refIdFrom["+refIdFrom+"]:::::::refIdTo["+refIdTo+"]");
//ih.lock_code ,ihd.lot_no,ihd.lot_sl,ihd.remarks ADDED BY RITESH
getDataSql= " select ihd.tran_id,ihd.line_no,ihd.lot_no,ihd.lot_sl," +
......@@ -516,6 +542,19 @@ public String wfValData(Document dom, Document dom1,Document dom2, String objCon
errString = errStringXml.toString();
return errString;
}
private String checkNull(String str)
{
if(str == null)
{
return "";
}
else
{
return str ;
}
}
private String errorType(Connection conn , String errorCode)
{
String msgType = "";
......
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