Commit fe319cdf authored by vvengurlekar's avatar vvengurlekar

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192406 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 32a48f16
...@@ -14780,6 +14780,8 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit ...@@ -14780,6 +14780,8 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
//java.util.Date currDate =null; //java.util.Date currDate =null;
String dateString = ""; //$NON-NLS-1$ String dateString = ""; //$NON-NLS-1$
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
String allowFutureDate = "";
java.util.Date todayDate = null;
// System.out.println("modCode:"+modCode+"tranDate:"+tranDate+"\nsiteCode"+siteCode); // System.out.println("modCode:"+modCode+"tranDate:"+tranDate+"\nsiteCode"+siteCode);
try try
{ {
...@@ -14789,6 +14791,9 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit ...@@ -14789,6 +14791,9 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
dtFormat = genericUtility.getApplDateFormat(); dtFormat = genericUtility.getApplDateFormat();
dtf = new java.text.SimpleDateFormat(dtFormat); dtf = new java.text.SimpleDateFormat(dtFormat);
dateString = dtf.format(tranDate); dateString = dtf.format(tranDate);
//Added by Varsha V on 26-10-18 to return error if future date is not allowed
todayDate = new java.util.Date();
//Ended by Varsha V on 26-10-18 to return error if future date is not allowed
System.out.println("Converted Date : "+dateString); //$NON-NLS-1$ System.out.println("Converted Date : "+dateString); //$NON-NLS-1$
if(!"ADM_FIN_PUR_SAL_MFG_IC_DIS_HLT".equals(modCode.toUpperCase())) //$NON-NLS-1$ if(!"ADM_FIN_PUR_SAL_MFG_IC_DIS_HLT".equals(modCode.toUpperCase())) //$NON-NLS-1$
...@@ -15040,6 +15045,19 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit ...@@ -15040,6 +15045,19 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
} }
} }
} }
//Added by Varsha V on 26-10-18 to return error if future date is not allowed
if(errCode == null || errCode.trim().length() == 0)
{
if(tranDate.after(todayDate))
{
allowFutureDate = checkNull(getFinparams("999999","ALW_FUTURE_DATE_TRAN",conn));
if(!(allowFutureDate.equalsIgnoreCase("Y")))
{
errCode = "VTPRDFDALW";
}
}
}
//Ended by Varsha V on 26-10-18 to return error if future date is not allowed
} }
catch (ITMException itme) catch (ITMException itme)
{ {
......
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