Commit d3eda685 authored by prane's avatar prane

date format in the string variable is not matching as per expected format.

1) receivablesMap.put("tran_date", Timestamp.valueOf(lsPostdate)); lsPostdate is need to be timestamp instead of application format
2) receivablesMap.put("ref_date", Timestamp.valueOf(lsPostdate)); lsPostdate is need to be timestamp instead of application format
3) receivablesMap.put("line_no__ref", lsNo);//changed[to handle ClassCastException in fincommon]
4) lcTotAmt=rs.getDouble("lcTotAmt"); //rs is used instead of rs1 due to same Invalid column name SQLException occured.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@189494 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 39493fff
...@@ -2533,7 +2533,8 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -2533,7 +2533,8 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
rs1=pstmt1.executeQuery(); rs1=pstmt1.executeQuery();
if(rs1.next()) if(rs1.next())
{ {
lcTotAmt=rs.getDouble("lcTotAmt"); //lcTotAmt=rs.getDouble("lcTotAmt");
lcTotAmt=rs1.getDouble("lcTotAmt"); //Chnaged by Pavan R on 21aug18[to handle Invalid column name]
} }
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
...@@ -2542,18 +2543,23 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -2542,18 +2543,23 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
lcRelAmt=(Double)glTraceMap.get("dr_amt")-lcTotAmt; lcRelAmt=(Double)glTraceMap.get("dr_amt")-lcTotAmt;
} }
ldDueDate=Timestamp.valueOf(lsPostdate); //Changed By Pavan Rane on 21aug18 [to handle IllegalArgumentException on date format change]
//ldDueDate=Timestamp.valueOf(lsPostdate);
ldDueDate = lsPostdateTemp;
System.out.println("Pavan Rane :: lsPostdate["+lsPostdate+"] lsPostdateTemp["+lsPostdateTemp+"]");
if(!llRelAfter.equalsIgnoreCase("0")) if(!llRelAfter.equalsIgnoreCase("0"))
{ {
ldDueDate=utlMethods.RelativeDate(ldDueDate,Integer.parseInt(llRelAfter)); ldDueDate=utlMethods.RelativeDate(ldDueDate,Integer.parseInt(llRelAfter));
} }
receivablesMap=new HashMap(); receivablesMap=new HashMap();
receivablesMap.put("tran_ser", "S-INV"); receivablesMap.put("tran_ser", "S-INV");
receivablesMap.put("tran_date", Timestamp.valueOf(lsPostdate)); //receivablesMap.put("tran_date", Timestamp.valueOf(lsPostdate)); //Chnaged by Pavan R on 21aug18[to handle Exception on Date]
receivablesMap.put("tran_date", lsPostdateTemp);
receivablesMap.put("fin_entity", InvoiceHrdMap.get("fin_entity")); receivablesMap.put("fin_entity", InvoiceHrdMap.get("fin_entity"));
receivablesMap.put("site_code", InvoiceHrdMap.get("site_code")); receivablesMap.put("site_code", InvoiceHrdMap.get("site_code"));
receivablesMap.put("ref_no", InvoiceHrdMap.get("invoice_id")); receivablesMap.put("ref_no", InvoiceHrdMap.get("invoice_id"));
receivablesMap.put("ref_date", Timestamp.valueOf(lsPostdate)); //receivablesMap.put("ref_date", Timestamp.valueOf(lsPostdate));//Chnaged by Pavan R on 21aug18[to handle Exception on Date]
receivablesMap.put("ref_date", lsPostdateTemp);
receivablesMap.put("due_date", ldDueDate); receivablesMap.put("due_date", ldDueDate);
receivablesMap.put("curr_code", InvoiceHrdMap.get("curr_code")); receivablesMap.put("curr_code", InvoiceHrdMap.get("curr_code"));
receivablesMap.put("exch_rate", InvoiceHrdMap.get("exch_rate")); receivablesMap.put("exch_rate", InvoiceHrdMap.get("exch_rate"));
...@@ -2574,8 +2580,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -2574,8 +2580,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
receivablesMap.put("eff_date", Timestamp.valueOf(genericUtility.getValidDateString(InvoiceHrdMap.get("eff_date"), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0")); receivablesMap.put("eff_date", Timestamp.valueOf(genericUtility.getValidDateString(InvoiceHrdMap.get("eff_date"), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"));
receivablesMap.put("sales_pers__1", InvoiceHrdMap.get("sales_pers__1")); receivablesMap.put("sales_pers__1", InvoiceHrdMap.get("sales_pers__1"));
receivablesMap.put("sales_pers__2", InvoiceHrdMap.get("sales_pers__2")); receivablesMap.put("sales_pers__2", InvoiceHrdMap.get("sales_pers__2"));
receivablesMap.put("item_ser", InvoiceHrdMap.get("item_ser")); receivablesMap.put("item_ser", InvoiceHrdMap.get("item_ser"));
receivablesMap.put("line_no__ref", lsNo); //receivablesMap.put("line_no__ref", lsNo);//changed[to handle ClassCastException]
receivablesMap.put("line_no__ref", String.valueOf(lsNo));
receivablesMap.put("gp_no", InvoiceHrdMap.get("gp_no")); receivablesMap.put("gp_no", InvoiceHrdMap.get("gp_no"));
//receivablesMap.put("gp_date", InvoiceHrdMap.get("gp_date")); //receivablesMap.put("gp_date", InvoiceHrdMap.get("gp_date"));
// 02-dec-16 manoharan avoid deprecated // 02-dec-16 manoharan avoid deprecated
......
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