Commit 316dd8b2 authored by kdabholkar's avatar kdabholkar

commited changes in 4A DIS and 9B Query


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106705 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9cf6156a
...@@ -949,7 +949,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -949,7 +949,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and state.state_code = c.STATE_CODE " +" and state.state_code = c.STATE_CODE "
+"and d.site_code= i.site_code__dlv " +"and d.site_code= i.site_code__dlv "
+"and st.state_code = d.state_code " +"and st.state_code = d.state_code "
+"and st.state_code <> state.state_code " // +"and st.state_code <> state.state_code " CHANGED ON 29 AUG done following changes After discussion with OM
+"AND ((st.state_code <> state.state_code) or ((st.state_code = state.state_code) and (s.fin_entity <> d.fin_entity)))"
//+" and (select count(1) from taxtran ti where ti.tran_code = 'D-ISS' and ti.tran_id = i.tran_id "; //+" and (select count(1) from taxtran ti where ti.tran_code = 'D-ISS' and ti.tran_id = i.tran_id ";
+" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'D-ISS' " +" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'D-ISS' "
+" and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') "; +" and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ";
...@@ -1180,7 +1181,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -1180,7 +1181,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' " +" and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' "
//+" and i.conf_date between ? and ? " commented by kaustubh on 27 july 2017 //+" and i.conf_date between ? and ? " commented by kaustubh on 27 july 2017
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
+" and (select count(1) from gst_data_hdr where ref_ser = 'P-RET' and ref_id = i.tran_id ) = 0 "; +" and (select count(1) from gst_data_hdr where ref_ser = 'VOUCH' and ref_id = i.tran_id ) = 0 ";
/** /**
* Detail Porcp Return Detail 4(A) P-RET* * Detail Porcp Return Detail 4(A) P-RET*
...@@ -4316,15 +4317,15 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4316,15 +4317,15 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
//+" and (select count(1) from taxtran ti where ti.tran_code = 'D-ISS' and ti.tran_id = i.tran_id "; //+" and (select count(1) from taxtran ti where ti.tran_code = 'D-ISS' and ti.tran_id = i.tran_id ";
+" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'D-ISS' " +" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'D-ISS' "
+" and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') "; +" and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ";
if(GST_NIL_TAXCLASS.length() > 0) if(taxClassAllStr.length() > 0)
{ {
hdrSql = hdrSql +" and ti.tax_class in ("+GST_NIL_TAXCLASS+") "; hdrSql = hdrSql +" and ti.tax_class not in ("+taxClassAllStr+") ";
} }
if(GST_NIL_TAXENV.length() > 0) if(taxEnvAllStr.length() > 0)
{ {
hdrSql = hdrSql +" and ti.tax_env in ("+GST_NIL_TAXENV+") "; hdrSql = hdrSql +" and ti.tax_env not in ("+taxEnvAllStr+") ";
} }
hdrSql = hdrSql +" ) > 0 " hdrSql = hdrSql +" ) > 0 "
+" and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' " +" and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' "
/*+" and i.conf_date between ? and ? " modified by kaustubh on 27 july */ /*+" and i.conf_date between ? and ? " modified by kaustubh on 27 july */
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
...@@ -6547,7 +6548,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6547,7 +6548,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
/*changed by kaustubh*/ /*changed by kaustubh*/
//+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 "; //+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 ";
+" and (select count(1) from gst_data_hdr where ref_ser = 'CRNRCP' and ref_id = i.invoice_id ) = 0 "; +" and (select count(1) from gst_data_hdr where ref_ser = 'CRNRCP' and ref_id = i.tran_id ) = 0 ";
/** /**
* Detail CDNR Credit Note registered 9B(1) (CRNRCP)* * Detail CDNR Credit Note registered 9B(1) (CRNRCP)*
...@@ -6770,7 +6771,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6770,7 +6771,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
/*changed by kaustubh*/ /*changed by kaustubh*/
//+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 "; //+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 ";
+" and (select count(1) from gst_data_hdr where ref_ser = 'DRNRCP' and ref_id = i.invoice_id ) = 0 "; +" and (select count(1) from gst_data_hdr where ref_ser = 'DRNRCP' and ref_id = i.tran_id ) = 0 ";
/** /**
* Detail CDNR Debit Note registered 9B(1) (DRNRCP)* * Detail CDNR Debit Note registered 9B(1) (DRNRCP)*
*/ */
...@@ -7073,7 +7074,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7073,7 +7074,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
/*changed by kaustubh*/ /*changed by kaustubh*/
//+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 "; //+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 ";
+" and (select count(1) from gst_data_hdr where ref_ser = 'CRNRCP' and ref_id = i.invoice_id ) = 0 "; +" and (select count(1) from gst_data_hdr where ref_ser = 'CRNRCP' and ref_id = i.tran_id ) = 0 ";
/** /**
* Detail CDNR Credit Note registered 9C(1) (CRNRCP)* * Detail CDNR Credit Note registered 9C(1) (CRNRCP)*
...@@ -7293,7 +7294,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7293,7 +7294,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and i.tran_date between ? and ? " +" and i.tran_date between ? and ? "
/*changed by kaustubh*/ /*changed by kaustubh*/
//+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 "; //+" and (select count(1) from gst_data_hdr where ref_ser = 'S-INV' and ref_id = i.invoice_id ) = 0 ";
+" and (select count(1) from gst_data_hdr where ref_ser = 'DRNRCP' and ref_id = i.invoice_id ) = 0 "; +" and (select count(1) from gst_data_hdr where ref_ser = 'DRNRCP' and ref_id = i.tran_id ) = 0 ";
/** /**
* Detail CDNR Debit Note registered 9C(1) (DRNRCP)* * Detail CDNR Debit Note registered 9C(1) (DRNRCP)*
*/ */
......
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