Commit 244515f4 authored by prane's avatar prane

Process date should be always greater than or equal to To date and...

Process date should be always greater than or equal to To date and ReceivableJV transaction saved(tran_date) on Process Date

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194578 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 18337beb
...@@ -260,6 +260,8 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -260,6 +260,8 @@ Put a validation chq amount in filter and total of details matches in case heade
BigDecimal invAmt = new BigDecimal(0.0); BigDecimal invAmt = new BigDecimal(0.0);
BigDecimal chqAmount = new BigDecimal(0.0); BigDecimal chqAmount = new BigDecimal(0.0);
BigDecimal custRefAmt = new BigDecimal(0.0); BigDecimal custRefAmt = new BigDecimal(0.0);
String procDateStr = "";
Timestamp procDate = null;
Timestamp tranDate = null; Timestamp tranDate = null;
Timestamp chequeDate = null; Timestamp chequeDate = null;
...@@ -368,7 +370,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -368,7 +370,7 @@ Put a validation chq amount in filter and total of details matches in case heade
} }
sdueDate = genericUtility.getColumnValue("due_date",headerDom); sdueDate = genericUtility.getColumnValue("due_date",headerDom);
System.out.println("due_date is :::"+sdueDate); System.out.println("due_dateFr is ::DOM::"+sdueDate);
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true);
if ( sdueDate == null || sdueDate.trim().length() == 0 ) if ( sdueDate == null || sdueDate.trim().length() == 0 )
{ {
...@@ -379,10 +381,10 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -379,10 +381,10 @@ Put a validation chq amount in filter and total of details matches in case heade
} }
sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()); sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00"); dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00");
System.out.println("Due Date **..........................**:"+dueDate); System.out.println("due_dateFr is ::Timestamp::"+dueDate);
sdueDate = genericUtility.getColumnValue("due_date_to",headerDom); sdueDate = genericUtility.getColumnValue("due_date_to",headerDom);
System.out.println("due_date is :::"+sdueDate); System.out.println("due_dateTo is ::DOM::"+sdueDate);
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true);
if ( sdueDate == null || sdueDate.trim().length() == 0 ) if ( sdueDate == null || sdueDate.trim().length() == 0 )
{ {
...@@ -393,8 +395,24 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -393,8 +395,24 @@ Put a validation chq amount in filter and total of details matches in case heade
} }
sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()); sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dueDateTo = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00"); dueDateTo = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00");
System.out.println("Due Date **..........................**:"+dueDate); System.out.println("due_dateTo is ::Timestamp::"+dueDateTo);
//Pavan R 17dec18[Process date should be always greater than or equal to To date]
procDateStr = genericUtility.getColumnValue("prc_date",headerDom);
System.out.println(">>>>Process Date::DOM::["+procDateStr+"]");
if(procDateStr == null || procDateStr.trim().length() == 0)
{
errString = itmDBAccessEJB.getErrorString("","VTNULLPRC","","",conn);
return errString;
}
procDateStr = genericUtility.getValidDateString(procDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
procDate = java.sql.Timestamp.valueOf(procDateStr + " 00:00:00");
System.out.println(">>>>Process Date::Timestamp::["+procDate+"]");
if(procDate.before(dueDateTo))
{
errString = itmDBAccessEJB.getErrorString("","VTPROCDATE","","",conn);
return errString;
}
//Pavan R 17dec18 --end
//suggestAdj = genericUtility.getColumnValue("suggest_adj",headerDom); //suggestAdj = genericUtility.getColumnValue("suggest_adj",headerDom);
System.out.println("suggest_adj........["+suggestAdj+"]"); System.out.println("suggest_adj........["+suggestAdj+"]");
...@@ -919,7 +937,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -919,7 +937,7 @@ Put a validation chq amount in filter and total of details matches in case heade
ArrayList receiptList = new ArrayList(); ArrayList receiptList = new ArrayList();
ArrayList dtl2lList = new ArrayList(); ArrayList dtl2lList = new ArrayList();
java.sql.Timestamp tranDate = new java.sql.Timestamp(System.currentTimeMillis()); //java.sql.Timestamp tranDate = new java.sql.Timestamp(System.currentTimeMillis());
java.sql.Timestamp chgDate = new java.sql.Timestamp(System.currentTimeMillis()); java.sql.Timestamp chgDate = new java.sql.Timestamp(System.currentTimeMillis());
java.sql.Timestamp dueDate = null,refDate = null; java.sql.Timestamp dueDate = null,refDate = null;
String returnString = "",sql = "",sql2 = "",tranSer=""; String returnString = "",sql = "",sql2 = "",tranSer="";
...@@ -942,6 +960,9 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -942,6 +960,9 @@ Put a validation chq amount in filter and total of details matches in case heade
double adjAmt=0,totalAdjAmt =0.0;// added by nandkumar gadkari on 03/04/18 double adjAmt=0,totalAdjAmt =0.0;// added by nandkumar gadkari on 03/04/18
String groupCode=""; String groupCode="";
String xmlString = "",objName=""; String xmlString = "",objName="";
String procDateStr = "";
String procDtStr = "";
Timestamp procDate = null;
try try
{ {
if(conn==null) if(conn==null)
...@@ -979,8 +1000,8 @@ conn = getConnection(); ...@@ -979,8 +1000,8 @@ conn = getConnection();
dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00"); dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00");
System.out.println("dueDate in process() "+dueDate); System.out.println("dueDate in process() "+dueDate);
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"dueDate in process() "+dueDate,true); /*//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"dueDate in process() "+dueDate,true);
//Pavan R 17dec18[Process date should be always greater than or equal to To date]
Object date = null; Object date = null;
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
date = sdf.parse(tranDate.toString()); date = sdf.parse(tranDate.toString());
...@@ -992,10 +1013,14 @@ conn = getConnection(); ...@@ -992,10 +1013,14 @@ conn = getConnection();
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
String trDate = sdf1.format(date).toString(); String trDate = sdf1.format(date).toString();
System.out.println("TranDate ::::-"+trDate); System.out.println("TranDate ::::-"+trDate);*/
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"TranDate ::::-"+trDate,true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,"TranDate ::::-"+trDate,true);
//Pavan R 17dec18[Process date should be always greater than or equal to To date]
procDateStr = genericUtility.getColumnValue("prc_date",headerDom);
procDtStr = genericUtility.getValidDateString(procDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
procDate = java.sql.Timestamp.valueOf(procDtStr + " 00:00:00");
System.out.println(">>>>Process Date inside Process::["+procDate+"]");
//Pavan R 17dec18 -end
/* try /* try
{ {
...@@ -1358,7 +1383,8 @@ conn = getConnection(); ...@@ -1358,7 +1383,8 @@ conn = getConnection();
receiptMap.put("chg_date",chgDate); receiptMap.put("chg_date",chgDate);
receiptMap.put("site_code",siteCode); receiptMap.put("site_code",siteCode);
receiptMap.put("due_date",dueDate); receiptMap.put("due_date",dueDate);
receiptMap.put("tran_date",tranDate); //receiptMap.put("tran_date",tranDate);
receiptMap.put("tran_date",procDate);
receiptMap.put("search_key",searchKey);//added by rajesh k to put serachkey in map receiptMap.put("search_key",searchKey);//added by rajesh k to put serachkey in map
receiptMap.put("ref_no",chequeNo); receiptMap.put("ref_no",chequeNo);
//receiptMap.put("cust_code",custCode);// added by rajesh k to put custcode in map //receiptMap.put("cust_code",custCode);// added by rajesh k to put custcode in map
...@@ -1479,7 +1505,8 @@ conn = getConnection(); ...@@ -1479,7 +1505,8 @@ conn = getConnection();
receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail
System.out.println("1298---receiptMap bank----"+receiptMap.get("bank_code")); System.out.println("1298---receiptMap bank----"+receiptMap.get("bank_code"));
//tranId = generateTranTd("w_receipt_adv",trDate,siteCode); //tranId = generateTranTd("w_receipt_adv",trDate,siteCode);
tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn); //tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn);
tranId = generateTranTd("w_receivables_jv",procDateStr,siteCode,conn);
System.out.println("TranId :::::::::::::::::; "+tranId); System.out.println("TranId :::::::::::::::::; "+tranId);
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"TranId ["+tranId+"]",true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,"TranId ["+tranId+"]",true);
receiptMap.put("tran_id",tranId); receiptMap.put("tran_id",tranId);
......
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