Commit 32335313 authored by pshinde's avatar pshinde

wms issue tracker point 409 Sales Return Form- Manual Return

Validation in the system to restrict the user to enter the same item code in multiple lines in the RMA


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95647 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 346a9902
......@@ -2922,8 +2922,9 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
//dw_detedit[ii_currformno].setitem(1,"exp_date",mexp_date)
if((mexpDate != null ) || (!(mexpDate.equals(""))))
if((mexpDate != null ) && (!(mexpDate.equals(""))))
{
System.out.println("Done ===========");
mtranDateStr = genericUtility.getColumnValue( "tran_date", dom1 ); // dw_header.getitemdatetime(1,"tran_date")
mtranDate = Timestamp.valueOf(genericUtility.getValidDateString( mtranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");// Added By Mahesh Patidar on 04/05/12 for convert the trandate string to tran date
mtranDateStr = genericUtility.getColumnValue( "exp_date", dom ); //Added By Mahesh on 04/05/12 for getting the expiry date
......@@ -3979,7 +3980,7 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
ArrayList errList = new ArrayList();
ArrayList errFields = new ArrayList();
String sqlStr="",mVal="",lsItemser="",blackListedYn="",lsStopBusiness="";
String sqlStr="",mVal="",lsItemser="",blackListedYn="",lsStopBusiness="",itemCode1="";
java.sql.Timestamp ldInvoiceDate = null;
int cnt=0;
String exchRateStr="",currCode="",mVal1="",custCode="";
......@@ -4419,6 +4420,9 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
break;
case 2 :
System.out.println( "Detail 2 Validation called " );
NodeList detail3List = dom2.getElementsByTagName("Detail2");
parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
......@@ -4473,7 +4477,11 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
}
if( childNodeName.equalsIgnoreCase( "item_code" ) )
{
mVal = genericUtility.getColumnValue( "item_code", dom );
mVal = genericUtility.getColumnValue( "item_code", dom);
System.out.println("itemCode= Mval==========>>>"+mVal);
//Validation for duplicate item code.If duplicate itemcode found it display error
//Added by Priyanka on 16/07/14 as per manoj sir instruction
siteCode = genericUtility.getColumnValue( "site_code", dom1 );
String mtrandateStr = genericUtility.getColumnValue( "tran_date", dom1 );
mtrandate = Timestamp.valueOf(genericUtility.getValidDateString( mtrandateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
......@@ -4484,6 +4492,31 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
{
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
else
{
int length = dom2.getElementsByTagName("Detail2").getLength();
System.out.println("length="+length);
int cntItem=0;
for(int i =0; i< dom2.getElementsByTagName("Detail2").getLength();i++)
{
System.out.println("Enter in For loop ");
itemCode1 = checkNull(genericUtility.getColumnValueFromNode("item_code",dom2.getElementsByTagName("Detail2").item(i))).trim();
System.out.println("itemCode1======>"+itemCode1);
if(mVal.equalsIgnoreCase(itemCode1))
{
cntItem=cntItem+1;
System.out.println("cntItem=="+cntItem);
}
}
if(cntItem>1)
{
System.out.println("item code Duplicate");
errCode = "VTDUPITMCD";//Duplicate Item Code for Sales Return.
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
System.out.println("For loop over");
}
}
if( childNodeName.equalsIgnoreCase( "unit" ) )
......
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