Commit 3920d358 authored by mjadhav's avatar mjadhav

chages done in today date to solve date format error


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98167 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3fe28274
......@@ -60,7 +60,7 @@ CreatePoVoucherAdvanceLocal, CreatePoVoucherAdvanceRemote
public String createPoVoucher(String tranId, String xtraParams,Connection conn, String as_flag, int ad_advperc, Date day, String mileStoneId,String relAgnstTerm,String lineNoTerm)throws ITMException
{
System.out.println("- createPoVoucher -@@@@@@@@@@@@@----as_flag["+as_flag+"]mileStoneId["+mileStoneId+"]");
System.out.println("- createPoVoucher!! -----as_flag["+as_flag+"]mileStoneId["+mileStoneId+"]");
System.out.println("relAgnstTerm :"+relAgnstTerm);
System.out.println("lineNoTerm :"+lineNoTerm);
String site = "", paymode = "", supp = "", curr = "", errcode = "",loginSiteCode="";
......@@ -85,16 +85,40 @@ CreatePoVoucherAdvanceLocal, CreatePoVoucherAdvanceRemote
double exch = 0,ordAmt=0.0;
porcpid = tranId;
SimpleDateFormat sdf = null;
java.sql.Timestamp tranDate = null ,today = null, chgdate = null, milestonedt = null, orddate = null;
String tran_Date =null;
java.sql.Timestamp tranDate = null ,today = null, chgdate = null, milestonedt = null, orddate = null,sysDate=null,sysDate1=null;
PreparedStatement pstmt = null, pstmtUp = null;
ResultSet rs = null;
MasterStatefulLocal masterStatefulLocal = null;
StringBuffer xmlBuff = new StringBuffer();
try {
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat());
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
today=java.sql.Timestamp.valueOf( sdf.format(new java.util.Date())+" 00:00:00.0");
java.util.Calendar cal = java.util.Calendar.getInstance();
tran_Date = sdf.format(cal.getTime());
System.out.println("tran_Date :"+tran_Date);
/*
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat());
java.util.Date currentDate1 = new java.util.Date();
sysDate1 = java.sql.Timestamp.valueOf( sdf1.format(currentDate1)+" 00:00:00.0");
System.out.println("sysDate1 :"+sysDate1);*/
/* java.util.Date currentDate = new java.util.Date();
sysDate = java.sql.Timestamp.valueOf( sdf.format(currentDate)+" 00:00:00.0");
System.out.println("sysDate :"+sysDate);
*/
System.out.println("sdf.format(new java.util.Date() :"+sdf.format(new java.util.Date()));
today=java.sql.Timestamp.valueOf( sdf1.format(new java.util.Date())+" 00:00:00.0");
System.out.println("today date is :"+today);
//sysDate = java.sql.Timestamp.valueOf( sdf.format(currentDate)+" 00:00:00.0");
AppConnectParm appConnect = new AppConnectParm();
Properties p = appConnect.getProperty();
InitialContext ctx = new InitialContext(p);
......@@ -1214,7 +1238,8 @@ CreatePoVoucherAdvanceLocal, CreatePoVoucherAdvanceRemote
xmlBuff.append("<cctr_code><![CDATA[" + cctrapadv+ "]]></cctr_code>");
xmlBuff.append("<emp_code><![CDATA[]]></emp_code>");
xmlBuff.append("<net_amt><![CDATA[" + String.valueOf(calRelAmt)+ "]]></net_amt>");
xmlBuff.append("<chg_date><![CDATA[" + today+ "]]></chg_date>");
xmlBuff.append("<chg_date><![CDATA[" + sdf.format(new java.util.Date()).toString()+ "]]></chg_date>");
//xmlBuff.append("<chg_date><![CDATA[" + today+ "]]></chg_date>");
xmlBuff.append("<chg_user><![CDATA["+ (userId == null ? "BASE" : userId)+ "]]></chg_user>");
xmlBuff.append("<chg_term><![CDATA["+ (termid == null ? "BASE" : termid)+ "]]></chg_term>");
xmlBuff.append("<net_amt__bc><![CDATA[" + String.valueOf(calRelAmt)+ "]]></net_amt__bc>");
......
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