Commit 5cce8c50 authored by kdabholkar's avatar kdabholkar

commited new changes in 7A2 and 7B2 section of GSTR1.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@180269 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 39cce2b3
...@@ -51,7 +51,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -51,7 +51,8 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
GST_PUREXE_TAXCLASS="",GST_PUREXE_TAXENV="",GST_PURNIL_TAXCLASS="",GST_PURNIL_TAXENV="",GST_PURNON_TAXCLASS="", GST_PUREXE_TAXCLASS="",GST_PUREXE_TAXENV="",GST_PURNIL_TAXCLASS="",GST_PURNIL_TAXENV="",GST_PURNON_TAXCLASS="",
GST_PURNON_TAXENV="",GST_IMPSER_TAXCLASS="",GST_IMPSER_TAXENV="",GST_IMPGD_TAXCLASS="",GST_IMPGD_TAXENV="", GST_PURNON_TAXENV="",GST_IMPSER_TAXCLASS="",GST_IMPSER_TAXENV="",GST_IMPGD_TAXCLASS="",GST_IMPGD_TAXENV="",
GST_IMPGDSEZ_TAXCLASS="",GST_IMPGDSEZ_TAXENV="",GST_PURSEZWP_TAXENV="",GST_PURSEZWP_TAXCLASS="",GST_PURSEZWOP_TAXENV="",GST_PURSEZWOP_TAXCLASS="", GST_IMPGDSEZ_TAXCLASS="",GST_IMPGDSEZ_TAXENV="",GST_PURSEZWP_TAXENV="",GST_PURSEZWP_TAXCLASS="",GST_PURSEZWOP_TAXENV="",GST_PURSEZWOP_TAXCLASS="",
GST_PURDE_TAXENV="",GST_PURDE_TAXCLASS="",GST_RCM_TAXCLASS="",GST_RCM_TAXENV="",SALES_DATA_MISC="",PURCHASE_DATA_PORCP="",MISC_VOUC_TYPE="",INV_ACCT_PORCP="",IMPL_MIN_RATE_HISTORY="",TRANSFER_TOSHOW_INNILRATED=""; GST_PURDE_TAXENV="",GST_PURDE_TAXCLASS="",GST_RCM_TAXCLASS="",GST_RCM_TAXENV="",SALES_DATA_MISC="",PURCHASE_DATA_PORCP="",MISC_VOUC_TYPE="",INV_ACCT_PORCP="",IMPL_MIN_RATE_HISTORY="",
GST_BANKCHANGES_ACC_CODES="",TRANSFER_TOSHOW_INNILRATED="";
Timestamp fromDate = null, toDate = null , fromdateOracle = null, todateOracle=null; Timestamp fromDate = null, toDate = null , fromdateOracle = null, todateOracle=null;
...@@ -2825,7 +2826,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2825,7 +2826,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" AND state.state_code = d.STATE_CODE__DLV " +" AND state.state_code = d.STATE_CODE__DLV "
+" and c.tax_reg_2 = 'UNREGISTER' " +" and c.tax_reg_2 = 'UNREGISTER' "
+" AND i.inv_type ='EC' " +" AND i.inv_type ='EC' "
+" and i.net_amt > "+GST_B2CL_INV_VAL+" " //-- amount is more than 2.5 lakh " +" and i.net_amt >= "+GST_B2CL_INV_VAL+" " //-- amount is more than 2.5 lakh "
+ "AND s.state_code = d.STATE_CODE__DLV " + "AND s.state_code = d.STATE_CODE__DLV "
+" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'S-INV' " +" 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') "; +" and ti.tran_id = i.invoice_id and tm.tax_type in ('G','H','I','J') ";
...@@ -4333,7 +4334,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4333,7 +4334,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" AND state.state_code = d.STATE_CODE__DLV" +" AND state.state_code = d.STATE_CODE__DLV"
+" and c.tax_reg_2 = 'UNREGISTER' " +" and c.tax_reg_2 = 'UNREGISTER' "
+" and i.inv_type = 'EC' " +" and i.inv_type = 'EC' "
+" and i.net_amt > "+GST_B2CL_INV_VAL+" " //-- amount is more than 2.5 lakh " +" and i.net_amt < "+GST_B2CL_INV_VAL+" " //-- amount is more than 2.5 lakh "
+" AND S.state_code = d.STATE_CODE__DLV " +" AND S.state_code = d.STATE_CODE__DLV "
+" 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' "
...@@ -4695,7 +4696,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4695,7 +4696,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" AND state.state_code = d.STATE_CODE__DLV " +" AND state.state_code = d.STATE_CODE__DLV "
+" and c.tax_reg_2 = 'UNREGISTER' " +" and c.tax_reg_2 = 'UNREGISTER' "
+" AND i.inv_type ='EC' " +" AND i.inv_type ='EC' "
+" and i.net_amt <= "+GST_B2CL_INV_VAL+" " +" and i.net_amt < "+GST_B2CL_INV_VAL+" "
+" AND S.state_code <> d.STATE_CODE__DLV " +" AND S.state_code <> d.STATE_CODE__DLV "
+" 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 (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'S-INV' " +" and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'S-INV' "
...@@ -10546,6 +10547,10 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -10546,6 +10547,10 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
INV_ACCT_PORCP = distCommon.getDisparams("999999", "INV_ACCT_PORCP", connGST); INV_ACCT_PORCP = distCommon.getDisparams("999999", "INV_ACCT_PORCP", connGST);
//added by kaustubh on 26 dec 2017 end Inventory Account flag //added by kaustubh on 26 dec 2017 end Inventory Account flag
//added by kaustubh on 12 feb 2018 To include the Bank charges start
GST_BANKCHANGES_ACC_CODES = distCommon.getDisparams("999999", "GST_BANKCHANGES_ACC_CODES", connGST);
//added by kaustubh on 26 dec 2018 To include the Bank charges end
PORD_TYP_IMP_SERVICE=PORD_TYP_IMP_SERVICE.replace(",", "','"); PORD_TYP_IMP_SERVICE=PORD_TYP_IMP_SERVICE.replace(",", "','");
PORD_TYP_IMP_SERVICE= "'"+PORD_TYP_IMP_SERVICE+"'"; PORD_TYP_IMP_SERVICE= "'"+PORD_TYP_IMP_SERVICE+"'";
...@@ -10624,6 +10629,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -10624,6 +10629,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
GST_RCM_TAXENV=GST_RCM_TAXENV.replace(",", "','"); GST_RCM_TAXENV=GST_RCM_TAXENV.replace(",", "','");
GST_RCM_TAXENV= "'"+GST_RCM_TAXENV+"'"; GST_RCM_TAXENV= "'"+GST_RCM_TAXENV+"'";
GST_BANKCHANGES_ACC_CODES=GST_BANKCHANGES_ACC_CODES.replace(",", "','");
GST_BANKCHANGES_ACC_CODES= "'"+GST_BANKCHANGES_ACC_CODES+"'";
...@@ -21440,6 +21448,13 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21440,6 +21448,13 @@ dtlSql = " select '' as TRAN_ID, "
System.out.println("strDte"+strDate); System.out.println("strDte"+strDate);
try{ try{
/**** Added on 09-02-2018 Query for Bank charges applied in case of Direct Payments as Service received from Bank -START ****/ /**** Added on 09-02-2018 Query for Bank charges applied in case of Direct Payments as Service received from Bank -START ****/
...@@ -21460,8 +21475,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21460,8 +21475,9 @@ dtlSql = " select '' as TRAN_ID, "
+" ' ' as DOC_CHECKSUM," +" ' ' as DOC_CHECKSUM,"
+" 'R' as DOC_TYPE,"// -- R- Regular B2B Invoices, DE – Deemed Exports, SEWP – SEZ Exports with payment,SEWOP – SEZ exports without payment +" 'R' as DOC_TYPE,"// -- R- Regular B2B Invoices, DE – Deemed Exports, SEWP – SEZ Exports with payment,SEWOP – SEZ exports without payment
+" i.REF_NO as DOC_NO," +" i.REF_NO as DOC_NO,"
+" i.REF_DATE as DOC_DATE," +" i.tran_date as DOC_DATE,"
+" i.amount as AMOUNT," // +" i.amount as AMOUNT,"
+" (select Sum(NET_AMT) from paydet_exp where tran_id=i.tran_id and acct_code in ("+GST_BANKCHANGES_ACC_CODES+")) as AMOUNT, "
+" 'Y' as REVERSE_CHRG," +" 'Y' as REVERSE_CHRG,"
+" ' ' as LR_NO," +" ' ' as LR_NO,"
+" ' ' as REAS_CODE," +" ' ' as REAS_CODE,"
...@@ -21541,7 +21557,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21541,7 +21557,7 @@ dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
{ {
dtlSql = dtlSql + "fn_gst_rate_amt(CAST('P-RCP' AS VARCHAR(6)),i.tran_id, CAST(it.line_no as char(3)), CAST('J' AS CHAR(1)), CAST('R' AS CHAR(1))) AS CESS_PERC," dtlSql = dtlSql + "fn_gst_rate_amt(CAST('P-RCP' AS VARCHAR(6)),i.tran_id, CAST(it.line_no as char(3)), CAST('J' AS CHAR(1)), CAST('R' AS CHAR(1))) AS CESS_PERC,"
+"fn_gst_rate_amt(CAST('P-RCP' AS VARCHAR(6)),i.tran_id, CAST(it.line_no as char(3)), CAST('J' AS CHAR(1)), CAST('A' AS CHAR(1))) AS CESS_AMT,"; + "fn_gst_rate_amt(CAST('P-RCP' AS VARCHAR(6)),i.tran_id, CAST(it.line_no as char(3)), CAST('J' AS CHAR(1)), CAST('A' AS CHAR(1))) AS CESS_AMT,";
} }
else else
{ {
...@@ -21570,11 +21586,11 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21570,11 +21586,11 @@ dtlSql = " select '' as TRAN_ID, "
// +"from porcp i,porcpdet it, item " // +"from porcp i,porcpdet it, item "
+" from payment_exp i,PAYDET_EXP it " +" from payment_exp i,PAYDET_EXP it "
+" where i.tran_id = it.tran_id " +" where i.tran_id = it.tran_id "
+"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code " +" and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code "
+"and ti.tran_code = 'P-RCP' " +" and ti.tran_code = 'P-RCP' "
+" and tx.TAX_GROUP IN ('ITC','NITC') " +" and tx.TAX_GROUP IN ('ITC','NITC') "
+" and ti.tran_id = i.tran_id " +" and ti.tran_id = i.tran_id "
+"and tx.tax_type in ('G','H','I','J') " ; +" and tx.tax_type in ('G','H','I','J') " ;
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
{ {
dtlSql =dtlSql +" and cast(ti.line_no as integer) = it.line_no ) > 0"; dtlSql =dtlSql +" and cast(ti.line_no as integer) = it.line_no ) > 0";
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