Commit e0d24b6a authored by smane's avatar smane

change in completion date validation to check validation if task_status is 'C'


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99230 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b4fd9665
...@@ -113,6 +113,7 @@ implements PurMilstnValidatorEJBLocal,PurMilstnValidatorEJBRemote { ...@@ -113,6 +113,7 @@ implements PurMilstnValidatorEJBLocal,PurMilstnValidatorEJBRemote {
String compl_date =""; String compl_date ="";
String tran_date = ""; String tran_date = "";
String date_format = ""; String date_format = "";
String taskStatus="";
double amount=0; double amount=0;
String purcOrder=""; String purcOrder="";
...@@ -135,26 +136,42 @@ implements PurMilstnValidatorEJBLocal,PurMilstnValidatorEJBRemote { ...@@ -135,26 +136,42 @@ implements PurMilstnValidatorEJBLocal,PurMilstnValidatorEJBRemote {
for(ctr = 0; ctr < childNodeListLength; ctr++) { for(ctr = 0; ctr < childNodeListLength; ctr++) {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
if (childNodeName.equalsIgnoreCase("compl_date")) { if (childNodeName.equalsIgnoreCase("compl_date"))
{
compl_date = getColumnValue("compl_date",dom); compl_date = getColumnValue("compl_date",dom);
tran_date = getColumnValue("tran_date",dom); tran_date = getColumnValue("tran_date",dom);
date_format = getColumnValue("date_format",dom); date_format = getColumnValue("date_format",dom);
date_format = date_format==null ? genericUtility.getApplDateFormat() : date_format.trim(); date_format = date_format==null ? genericUtility.getApplDateFormat() : date_format.trim();
if (compl_date == null || compl_date.trim().length() == 0) { taskStatus = getColumnValue("task_status",dom); // Code Added by Sagar on 24/11/15
errCode = "VTCPLDTINV";//This is a pre existing err code System.out.println(">>taskStatus:"+taskStatus);
errString = getErrorString("compl_date",errCode,userId); if(taskStatus== null || taskStatus.trim().length()== 0)
break; {
} else { taskStatus="P";
if(date_format.length() > 0){ }
boolean isBetweenDate = isBetweenDate(tran_date, compl_date, date_format); if("C".equalsIgnoreCase(taskStatus.trim())) // Condition Added by Sagar on 24/11/15
if(!isBetweenDate){ {
errCode = "VTCPLDTGRT";//This is a pre existing err code if (compl_date == null || compl_date.trim().length() == 0)
errString = getErrorString("compl_date",errCode,userId); {
break; errCode = "VTCPLDTINV";//This is a pre existing err code
errString = getErrorString("compl_date",errCode,userId);
break;
}
else
{
if(date_format.length() > 0)
{
boolean isBetweenDate = isBetweenDate(tran_date, compl_date, date_format);
if(!isBetweenDate)
{
errCode = "VTCPLDTGRT";//This is a pre existing err code
errString = getErrorString("compl_date",errCode,userId);
break;
}
} }
} }
} }
}// end of compl_date }// end of compl_date
else if (childNodeName.equalsIgnoreCase("amount")) else if (childNodeName.equalsIgnoreCase("amount"))
......
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