Commit bb6a24bb authored by ajadhav's avatar ajadhav

call nfCheckPeriod using finCommon object

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176854 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e70ab3fe
......@@ -26,7 +26,7 @@ public class AutoPmtGen extends ValidatorEJB implements AutoPmtGenLocal,AutoPmtG
// GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
FinCommon finCommon = new FinCommon();
/*public void ejbCreate() throws RemoteException, CreateException
{
System.out.println("Entering into AutoPmtGenEJB.............");
......@@ -375,7 +375,10 @@ conn = getConnection();
SimpleDateFormat sdf = null;
sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
Date payDt = sdf.parse(genericUtility.getValidDateString(payDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
errCode = itmDBAccessEJB.nfCheckPeriod("FIN",payDt,siteCode,conn);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = itmDBAccessEJB.nfCheckPeriod("FIN",payDt,siteCode,conn);
errCode=finCommon.nfCheckPeriod("FIN",payDt,siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != "")
{
errString = getErrorString("site_code__fr",errCode,userId);
......
......@@ -149,7 +149,10 @@ conn = getConnection();
//Transtr = this.genericUtility.getColumnValue("TranDate", dom);
siteCode =this.genericUtility.getColumnValue("site_code", dom);
tranDate = dateFormat.parse(this.genericUtility.getColumnValue("tran_date", dom));
errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
errCode=finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() >0)
{
errList.add(errCode);
......
......@@ -28,6 +28,7 @@ import javax.ejb.Stateless;
@Stateless
public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, EcollectionICRemote {
E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException {
String errString = "";
......@@ -145,7 +146,10 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
errCode = nfCheckPeriod("FIN", tranDate, siteCode);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = nfCheckPeriod("FIN", tranDate, siteCode);
errCode=finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if (errCode != null && errCode.trim().length() > 0) {
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
......
......@@ -25,6 +25,7 @@ import javax.ejb.Stateless; // added for ejb3
public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPayAutoRemote // SessionBean
{
E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
/*public void ejbCreate() throws RemoteException,CreateException{
}
......@@ -232,7 +233,10 @@ public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPa
}
tranDate = sdf.parse(columnValue.substring(0,8));
siteCode = genericUtility.getColumnValue("site_code__fr",dom);
errCode = nfCheckPeriod("FIN",tranDate , siteCode);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = nfCheckPeriod("FIN",tranDate , siteCode);
errCode = finCommon.nfCheckPeriod("FIN",tranDate , siteCode,conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() > 0){
errString = itmDBAccess.getErrorString("date__pay",errCode,userId);
break;
......
......@@ -32,6 +32,7 @@ public class MiscVchEmpIC extends ValidatorEJB implements MiscVchEmpICLocal,Misc
{
// GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
System.out.println("------------ wfvalData method called-----------------");
......@@ -263,7 +264,10 @@ conn = getConnection();
}else{
if(tranDate.length() > 0){
tranDateL=simpleDateFormatObj.parse(tranDate);
String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
//Changes and Commented By Ajay on 21-12-2017:START
//String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
String code=finCommon.nfCheckPeriod("FIN", tranDateL, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
System.out.println("Period check111--->>["+code+"]");
if(code.length() > 0){
errCode = code;
......
......@@ -189,7 +189,10 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
try
{
tranPdate = simpleDateFormat.parse(tranDate);
errCode = validator.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = validator.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode);
errCode=finCommon.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
}
catch (ParseException e)
{
......
......@@ -371,7 +371,10 @@ conn = getConnection();
System.out.println("prioddddddddd");
tranDate = dateFormat2.parse(this.genericUtility.getColumnValue("tran_date", dom));
errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
//Changes and Commented By Ajay on 21-12-2017:START
//errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
errCode = finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() >0)
{
errList.add(errCode);
......
......@@ -37,7 +37,7 @@ import org.w3c.dom.NodeList;
public class SalesBudgetCustIC extends ValidatorEJB implements SalesBudgetCustICLocal,SalesBudgetCustICRemote
{
E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
System.out.println("------------ wfvalData method called-----------------");
......@@ -153,7 +153,10 @@ conn = getConnection();
}else{
if(tranDate.length() > 0){
tranDateL=simpleDateFormatObj.parse(tranDate);
String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
//Changes and Commented By Ajay on 21-12-2017:START
//String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
String code = checkNull(finCommon.nfCheckPeriod("FIN", tranDateL, siteCode, conn));
//Changes and Commented By Ajay on 21-12-2017:END
System.out.println("Period check111--->>["+code+"]");
if(code.length() > 0){
errCode = code;
......
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