Commit d0b63a87 authored by ngadkari's avatar ngadkari

On confirmation of invoice ,If ledg_post_conf column value is "Y" in transetup...

On confirmation of invoice ,If ledg_post_conf column value is "Y" in transetup for 'w_invoice' tran_window then system set todays date(without time part) in tran_date column

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196226 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b6042f70
......@@ -3318,6 +3318,36 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
Timestamp todayDate = Timestamp.valueOf(genericUtility.getValidDateString(sysDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("xtraParams>>>"+xtraParams);
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
//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 = "";
int count = 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);
count = pstmt.executeUpdate();
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]
sql = "select confirmed from invoice where invoice_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, invoiceId);
......@@ -3455,4 +3485,4 @@ public class PostOrdInvoicePost extends ActionHandlerEJB implements PostOrdInvoi
return inputStr;
}
}
}
\ No newline at end of file
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