Commit 17aaa2e7 authored by kdabholkar's avatar kdabholkar

changes in export query State Join

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@163491 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7acdcb79
...@@ -2487,7 +2487,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2487,7 +2487,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" '06' as TRAN_TYPE," +" '06' as TRAN_TYPE,"
+" i.cust_code as CUST_CODE, " +" i.cust_code as CUST_CODE, "
+" c.cust_name as CUST_NAME, " +" c.cust_name as CUST_NAME, "
+" state.GST_CODE, " // +" state.GST_CODE, "
+" '' as GST_CODE, "
+" '' as SUBMISSION_TYPE," +" '' as SUBMISSION_TYPE,"
+" '' as DOC_CHECKSUM," +" '' as DOC_CHECKSUM,"
+" 'WPAY' as DOC_TYPE, " +" 'WPAY' as DOC_TYPE, "
...@@ -2527,13 +2528,16 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2527,13 +2528,16 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" 'S-INV' as ref_ser " +" 'S-INV' as ref_ser "
// +" from invoice i,customer c, site s, state state, station station" COOMENTED BY KAUSTUBH ON 22 AUG // +" from invoice i,customer c, site s, state state, station station" COOMENTED BY KAUSTUBH ON 22 AUG
+" from invoice i,customer c, site s, state state" // +" from invoice i,customer c, site s, state state" commented on 22 sep 2017
+" from invoice i,customer c, site s "
+" where c.cust_code = i.cust_code " +" where c.cust_code = i.cust_code "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " // +" and state.state_code = c.state_code " commented on 22 sep 2017
// +" and c.tax_reg_2 <> 'UNREGISTER' " commented by kautubh on 22 Aug 2017 // +" and c.tax_reg_2 <> 'UNREGISTER' " commented by kautubh on 22 Aug 2017
// +" and c.tax_reg_2 = 'UNREGISTER' " // +" and c.tax_reg_2 = 'UNREGISTER' "
+" and (select count(1) from taxtran ti where ti.tran_code = 'S-INV' and ti.tran_id = i.invoice_id "; +" and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code "
+" and ti.tran_code = 'S-INV' and ti.tran_id = i.invoice_id "
+" and tm.tax_type in ('G','H','I','J')" ;
if(GST_EXPWP_TAXCLASS.length() > 0) if(GST_EXPWP_TAXCLASS.length() > 0)
{ {
hdrSql = hdrSql +" and ti.tax_class in ("+GST_EXPWP_TAXCLASS+") "; hdrSql = hdrSql +" and ti.tax_class in ("+GST_EXPWP_TAXCLASS+") ";
...@@ -2712,7 +2716,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2712,7 +2716,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" '07' as TRAN_TYPE," +" '07' as TRAN_TYPE,"
+" i.cust_code as CUST_CODE, " +" i.cust_code as CUST_CODE, "
+" c.cust_name as CUST_NAME, " +" c.cust_name as CUST_NAME, "
+" state.GST_CODE, " // +" state.GST_CODE, " commeneted on 22 sepn 2016
+" ' ' as GST_CODE, "
+" '' as SUBMISSION_TYPE," +" '' as SUBMISSION_TYPE,"
+" '' as DOC_CHECKSUM," +" '' as DOC_CHECKSUM,"
+" 'WOPAY' as DOC_TYPE, " +" 'WOPAY' as DOC_TYPE, "
...@@ -2751,12 +2756,16 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2751,12 +2756,16 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" ' ' as ECOM_REG_NO, " +" ' ' as ECOM_REG_NO, "
+" 'S-INV' as ref_ser " +" 'S-INV' as ref_ser "
// +" from invoice i,customer c, site s, state state, station station " COMMENTED BY KAUSTUBH ON 22 AUG 2017 // +" from invoice i,customer c, site s, state state, station station " COMMENTED BY KAUSTUBH ON 22 AUG 2017
+" from invoice i,customer c, site s, state state" // +" from invoice i,customer c, site s, state state" chnaged on 22 sep 2017
+" from invoice i,customer c, site s "
+" where c.cust_code = i.cust_code " +" where c.cust_code = i.cust_code "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " // +" and state.state_code = c.state_code " commeneted on 22 sep 2017
// +" and c.tax_reg_2 <> 'UNREGISTER' " // +" and c.tax_reg_2 <> 'UNREGISTER' "
+" and (select count(1) from taxtran ti where ti.tran_code = 'S-INV' and ti.tran_id = i.invoice_id "; +" and (select count(1) from taxtran ti, "
+" tax tm where tm.tax_code = ti.tax_code "
+" and ti.tran_code = 'S-INV' and ti.tran_id = i.invoice_id "
+" and tm.tax_type in ('G','H','I','J')" ;
if(GST_EXPWOP_TAXCLASS.length() > 0) if(GST_EXPWOP_TAXCLASS.length() > 0)
{ {
hdrSql = hdrSql +" and ti.tax_class in ("+GST_EXPWOP_TAXCLASS+") "; hdrSql = hdrSql +" and ti.tax_class in ("+GST_EXPWOP_TAXCLASS+") ";
......
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