Commit aaf2056a authored by prane's avatar prane

removed supplier join and applicable for all sundry type

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@186212 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1f36b43a
...@@ -215,11 +215,28 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -215,11 +215,28 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
pstmt1=null; pstmt1=null;
count=false; count=false;
} }
sql1="select gp_ser,tran_date,gp_date,tran_id,conf_date from misc_voucher i,supplier c, site s, state state where"
//Changed by Pavan R on 08jun2k18[removed supplier join and applicable for all sundry type][Start]
/*sql1="select gp_ser,tran_date,gp_date,tran_id,conf_date from misc_voucher i,supplier c, site s, state state where"
+ " c.supp_code = i.sundry_code and i.sundry_type = 'S' and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and" + " c.supp_code = i.sundry_code and i.sundry_type = 'S' and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and"
+ " (c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null)" + " (c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null)"
+ " and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'M-VOUC' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0" + " and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'M-VOUC' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0"
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? "; + " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? "; */
sql1="SELECT gp_ser, tran_date, gp_date, tran_id, conf_date "
+ " FROM misc_voucher i, site s "
+ " WHERE s.site_code = i.site_code "
+ " AND i.site_code = ? "
+ " AND i.gp_no IS NULL "
+ " AND DDF_GET_TAX_REG_2(i.sundry_code,i.sundry_type) = 'UNREGISTER' "
+ " AND (SELECT COUNT(1) "
+ " FROM taxtran ti, tax tm "
+ " WHERE tm.tax_code = ti.tax_code "
+ " AND ti.tran_code = 'M-VOUC' "
+ " AND ti.tran_id = i.tran_id "
+ " AND tm.tax_type IN ('G','H','I','J') ) > 0 "
+ " AND CASE WHEN i.confirmed IS NULL THEN 'N' ELSE i.confirmed END = 'Y'"
+ " AND TRUNC(i.conf_date) BETWEEN ? AND ? ";
//Changes by Pavan R End
pstmt=con.prepareStatement(sql1); pstmt=con.prepareStatement(sql1);
//pstmt.setString(1,"voucher"); //pstmt.setString(1,"voucher");
pstmt.setString(1,siteCode); pstmt.setString(1,siteCode);
......
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