Commit 4e6e79f2 authored by arawankar's avatar arawankar

PostOrdInvoiceGen.java

PostOrdInvoicePost.java
-Changes made to set todays date in tran_date of invoice if ledg_post_conf is "Y" for w_invoice.
-Changes made to set trans_mode in invoice

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196376 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3e71dc4a
...@@ -493,6 +493,35 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -493,6 +493,35 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
xmlBuff.append("<acc_code__order><![CDATA[" +acctSchemehdrMap.get("ls_acct_schemehdr")+ "]]></acc_code__order>"); xmlBuff.append("<acc_code__order><![CDATA[" +acctSchemehdrMap.get("ls_acct_schemehdr")+ "]]></acc_code__order>");
xmlBuff.append("<tran_mode><![CDATA[" +"S"+ "]]></tran_mode>"); xmlBuff.append("<tran_mode><![CDATA[" +"S"+ "]]></tran_mode>");
//Modified by Anjali R. on [29/01/2019][set trans_mode from despatch ,if tran_mode get null or blank then get it from sale order][Start]
String transMode = invDespMap.get("trans_mode");
String saleOrder = invDespMap.get("sord_no");
if(transMode == null || transMode.trim().length() == 0)
{
if(saleOrder != null && saleOrder.trim().length() > 0)
{
sql = "select trans_mode from sorder where sale_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder);
rs = pstmt.executeQuery();
while(rs.next())
{
transMode = checknull(rs.getString("trans_mode"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
}
xmlBuff.append("<trans_mode><![CDATA[" +transMode+ "]]></trans_mode>");
//Modified by Anjali R. on [29/01/2019][set trans_mode from despatch ,if tran_mode get null or blank then get it from sale order][End]
xmlBuff.append("<desp_id><![CDATA[" +invDespMap.get("desp_id")+ "]]></desp_id>"); xmlBuff.append("<desp_id><![CDATA[" +invDespMap.get("desp_id")+ "]]></desp_id>");
xmlBuff.append("<desp_date><![CDATA[" +invDespMap.get("desp_date")+ "]]></desp_date>"); xmlBuff.append("<desp_date><![CDATA[" +invDespMap.get("desp_date")+ "]]></desp_date>");
xmlBuff.append("<sale_order><![CDATA[" +invDespMap.get("sord_no")+ "]]></sale_order>"); xmlBuff.append("<sale_order><![CDATA[" +invDespMap.get("sord_no")+ "]]></sale_order>");
......
...@@ -98,7 +98,40 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -98,7 +98,40 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
InvAcct invAcct=new InvAcct(); InvAcct invAcct=new InvAcct();
///Start of round code ///Start of round code
//Modified by Anjali R. on [29/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][Start]
String ledgPostConf = "";
int rowCount = 0;
sql = "select ledg_post_conf from transetup where tran_window = 'w_invoice'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
ledgPostConf = checkNull(rs.getString("ledg_post_conf"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if("Y".equalsIgnoreCase(ledgPostConf))
{
sql = "update invoice set tran_date = trunc(sysdate) where invoice_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, invoiceId);
rowCount = pstmt.executeUpdate();
System.out.println("count--["+rowCount+"]");
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
//Modified by Anjali R. on [29/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][End]
sql="select cust_code,item_ser,net_amt from invoice where invoice_id=?"; sql="select cust_code,item_ser,net_amt from invoice where invoice_id=?";
pstmt2= conn.prepareStatement(sql); pstmt2= conn.prepareStatement(sql);
pstmt2.setString(1,invoiceId ); pstmt2.setString(1,invoiceId );
...@@ -3319,8 +3352,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -3319,8 +3352,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
System.out.println("xtraParams>>>"+xtraParams); System.out.println("xtraParams>>>"+xtraParams);
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"); loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
//Modified by Anjali R. on [29/01/2019][This code has been shifted in invoicePosting method][Start]
//Modified by Anjali R. on [23/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][Start] //Modified by Anjali R. on [23/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][Start]
String ledgPostConf = ""; /*String ledgPostConf = "";
int count = 0; int count = 0;
sql = "select ledg_post_conf from transetup where tran_window = 'w_invoice'"; sql = "select ledg_post_conf from transetup where tran_window = 'w_invoice'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -3346,8 +3380,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi ...@@ -3346,8 +3380,9 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
pstmt.setString(1, invoiceId); pstmt.setString(1, invoiceId);
count = pstmt.executeUpdate(); count = pstmt.executeUpdate();
System.out.println("count--["+count+"]"); System.out.println("count--["+count+"]");
} }*/
//Modified by Anjali R. on [23/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][End] //Modified by Anjali R. on [23/01/2019][To Update tran_date as todays date in case of ledg_post_conf is "Y"][End]
//Modified by Anjali R. on [29/01/2019][This code has been shifted in invoicePosting method][End]
sql = "select confirmed from invoice where invoice_id = ? "; sql = "select confirmed from invoice where invoice_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, invoiceId); pstmt.setString(1, invoiceId);
......
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