Commit 44a66ead authored by prane's avatar prane

Changes are done in sql as per join with supplier is removerd and added DDF_GET_SUNDRY_NAME fun

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@185703 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3180352b
...@@ -188,29 +188,41 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -188,29 +188,41 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
try try
{ {
//Changes are done in sql as per join with supplier is removerd and added DDF_GET_SUNDRY_NAME fun
getDataSql1= "SELECT M.SUNDRY_CODE,S.SUPP_NAME,M.TRAN_SER,M.TRAN_DATE, M.REF_NO, M.REF_DATE,M.TOT_AMT,M.ADJ_AMT," getDataSql1 = "SELECT SUNDRY_CODE,"
+"M.ACCT_CODE,M.CCTR_CODE, M.TRAN_ID,M.CURR_CODE, M.EXCH_RATE,M.DUE_DATE, M.SITE_CODE,M.FIN_ENTITY,M.BANK_CODE " + " DDF_GET_SUNDRY_NAME (SUNDRY_CODE, SUNDRY_TYPE) AS SUPP_NAME,"
+"from MISC_PAYABLES M, SUPPLIER S " + " TRAN_SER,"
+"where ( M.SUNDRY_CODE = S.SUPP_CODE) " + " TRAN_DATE,"
+ "and ( ( M.due_date between ? and ? )" + " REF_NO,"
+ " and ( M.sundry_code between ? and ? ) " + " REF_DATE,"
+ "and ( M.site_code = ? ) "; + " TOT_AMT,"
if("N".equalsIgnoreCase(payableV.trim())) + " ADJ_AMT,"
{ + " ACCT_CODE,"
getDataSql1 = getDataSql1 + " AND ( M.tot_amt < 0 ) "; + " CCTR_CODE,"
} + " TRAN_ID,"
if("P".equalsIgnoreCase(payableV.trim())) + " CURR_CODE,"
{ + " EXCH_RATE,"
getDataSql1 = getDataSql1 + " AND ( M.tot_amt > 0 ) "; + " DUE_DATE,"
} + " SITE_CODE,"
+ " FIN_ENTITY,"
getDataSql1= getDataSql1 + "and ( M.tot_amt - M.adj_amt <> 0 ) ) "; + " BANK_CODE"
+ " from MISC_PAYABLES"
+ " where ( due_date between ? and ? )"
+ " and ( sundry_code between ? and ? ) "
+ " and ( site_code = ? ) ";
if("N".equalsIgnoreCase(payableV.trim()))
{
getDataSql1 = getDataSql1 + " AND ( tot_amt < 0 ) ";
}
if("P".equalsIgnoreCase(payableV.trim()))
{
getDataSql1 = getDataSql1 + " AND ( tot_amt > 0 ) ";
}
getDataSql1= getDataSql1 + " and ( tot_amt - adj_amt <> 0 ) ";
pstmt = conn.prepareStatement(getDataSql1); pstmt = conn.prepareStatement(getDataSql1);
System.out.println("The getDataSql becomes .................:"+getDataSql1); System.out.println("The getDataSql becomes .................:"+getDataSql1);
pstmt.setTimestamp(1,dueDateFrom); pstmt.setTimestamp(1,dueDateFrom);
pstmt.setTimestamp(2,dueDateTo); pstmt.setTimestamp(2,dueDateTo);
pstmt.setString(3,suppCodefrom); pstmt.setString(3,suppCodefrom);
......
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