Commit 8362bad6 authored by kdabholkar's avatar kdabholkar

commited new changes regarding crdit /debit note (unregister) queries of GATR 1

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177819 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 530d8788
...@@ -7217,7 +7217,6 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7217,7 +7217,6 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/** /**
* 9B(1) Header CDNR Credit Note registered (CRNRCP)* * 9B(1) Header CDNR Credit Note registered (CRNRCP)*
*/ */
{ {
/** /**
* 9B(1) Header CDNR Credit Note registered (CRNRCP)* * 9B(1) Header CDNR Credit Note registered (CRNRCP)*
...@@ -7455,7 +7454,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7455,7 +7454,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/*added by kaustubh on 20-07-2017*/ /*added by kaustubh on 20-07-2017*/
/*+" and u.unit = item.unit ";*/ /*+" and u.unit = item.unit ";*/
retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B(1)"); retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B1(CRN-REG)");
} }
...@@ -7693,15 +7692,15 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7693,15 +7692,15 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/*added by kaustubh on 20-07-2017*/ /*added by kaustubh on 20-07-2017*/
/*+" and u.unit = item.unit ";*/ /*+" and u.unit = item.unit ";*/
retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B(1)"); retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B1(DRN-REG)");
} }
/******* 9C started ********/ /******* 9B 2 started ********/
{ {
/** /**
* 9C(1) Header CDNR Credit Note registered (CRNRCP)* * 9B(2) Header CDNR Credit Note unregistered (CRNRCP)*
*/ */
/* hdrSql = " select '' as TRAN_ID, " /* hdrSql = " select '' as TRAN_ID, "
modified by kaustubh modified by kaustubh
...@@ -7804,7 +7803,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7804,7 +7803,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
hdrSql=hdrSql*/ hdrSql=hdrSql*/
+" '1' as REC_TYPE, " +" '1' as REC_TYPE, "
+" 'C' as GST_TYPE," +" 'C' as GST_TYPE,"
+" '29' as TRAN_TYPE," +" '31' as TRAN_TYPE,"
/*commented by kaustubh*/ /*commented by kaustubh*/
// +" case when i.drcr_flag = 'C' then '29' else '30' end as TRAN_TYPE, " // +" case when i.drcr_flag = 'C' then '29' else '30' end as TRAN_TYPE, "
+" i.cust_code as CUST_CODE, " +" i.cust_code as CUST_CODE, "
...@@ -7856,20 +7855,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -7856,20 +7855,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and inv.invoice_id = i.invoice_id " +" and inv.invoice_id = i.invoice_id "
+" and i.drcr_flag ='C'" //added by kaustubh on 26 july to seperate Debit and credit note data +" and i.drcr_flag ='C'" //added by kaustubh on 26 july to seperate Debit and credit note data
+" 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 where ti.tran_code = 'CRNRCP' ) > 0 " ; //modified by kaustubh on 26 july 2017 add DRNCRP +" and (select count(1) from taxtran ti where ti.tran_code = 'CRNRCP' ) > 0 " //modified by kaustubh on 26 july 2017 add DRNCRP
/* +" and to_date(inv.conf_date) < '"+currMonthStartDate+"' " commented by kaustubh on 26 july remove to_date for DB2*/ /* +" and to_date(inv.conf_date) < '"+currMonthStartDate+"' " commented by kaustubh on 26 july remove to_date for DB2*/
// +" and inv.conf_date < '"+currMonthStartDate+"' " commented by kaustubh on 27 july // +" and inv.conf_date < '"+currMonthStartDate+"' " commented by kaustubh on 27 july
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
{
hdrSql = hdrSql +" and inv.tran_date < '"+currMonthStartDate+"' ";
}
else
{
hdrSql = hdrSql +" and inv.tran_date < '"+strDate+"' "; +" and c.tax_reg_2 = 'UNREGISTER' "
}
hdrSql = hdrSql
+" and c.tax_reg_2 <> 'UNREGISTER' "
+" 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 ? "
...@@ -8008,11 +7998,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -8008,11 +7998,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/*added by kaustubh on 20-07-2017*/ /*added by kaustubh on 20-07-2017*/
/*+" and u.unit = item.unit ";*/ /*+" and u.unit = item.unit ";*/
retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9C(1)"); retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B2(CRN-UNREG)");
} }
/** /**
* 9C(1) Header Debit Note registered (DRNRCP)* * 9B(1) Header Debit Note registered (DRNRCP)*
*/ */
{ {
hdrSql = " select '' as TRAN_ID, " hdrSql = " select '' as TRAN_ID, "
...@@ -8036,7 +8026,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -8036,7 +8026,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
hdrSql=hdrSql*/ hdrSql=hdrSql*/
+" '1' as REC_TYPE, " +" '1' as REC_TYPE, "
+" 'D' as GST_TYPE," +" 'D' as GST_TYPE,"
+" '30' as TRAN_TYPE," +" '32' as TRAN_TYPE,"
/*commented by kaustubh*/ /*commented by kaustubh*/
// +" case when i.drcr_flag = 'C' then '29' else '30' end as TRAN_TYPE, " // +" case when i.drcr_flag = 'C' then '29' else '30' end as TRAN_TYPE, "
+" i.cust_code as CUST_CODE, " +" i.cust_code as CUST_CODE, "
...@@ -8090,21 +8080,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -8090,21 +8080,11 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" and inv.invoice_id = i.invoice_id " +" and inv.invoice_id = i.invoice_id "
+" and i.drcr_flag ='D'" //added by kaustubh on 26 july to seperate Debit and credit note data +" and i.drcr_flag ='D'" //added by kaustubh on 26 july to seperate Debit and credit note data
+" 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 where ti.tran_code = 'DRNRCP' ) > 0 " ; //modified by kaustubh on 26 july 2017 add DRNCRP +" and (select count(1) from taxtran ti where ti.tran_code = 'DRNRCP' ) > 0 " //modified by kaustubh on 26 july 2017 add DRNCRP
/* +" and to_date(inv.conf_date) < '"+currMonthStartDate+"' " commented by kaustubh on 26 july remove to_date for DB2*/ /* +" and to_date(inv.conf_date) < '"+currMonthStartDate+"' " commented by kaustubh on 26 july remove to_date for DB2*/
// +" and inv.conf_date < '"+currMonthStartDate+"' " commented by kaustubh on 27 july 2017 // +" and inv.conf_date < '"+currMonthStartDate+"' " commented by kaustubh on 27 july 2017
//+" and inv.tran_date < '"+currMonthStartDate+"' " changed by kaustubh on 31 july 2017 //+" and inv.tran_date < '"+currMonthStartDate+"' " changed by kaustubh on 31 july 2017
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" and c.tax_reg_2 = 'UNREGISTER' "
{
hdrSql = hdrSql +" and inv.tran_date < '"+currMonthStartDate+"' ";
}
else
{
hdrSql = hdrSql +" and inv.tran_date < '"+strDate+"' ";
}
hdrSql = hdrSql
+" and c.tax_reg_2 <> 'UNREGISTER' "
+" 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 ? "
...@@ -8244,7 +8224,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -8244,7 +8224,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/*added by kaustubh on 20-07-2017*/ /*added by kaustubh on 20-07-2017*/
/*+" and u.unit = item.unit ";*/ /*+" and u.unit = item.unit ";*/
retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9C(1)"); retString = executeSqlAndPopulateData(hdrSql,dtlSql,"9B2(DRN-UNREG)");
} }
/******11A Started ******/ /******11A Started ******/
...@@ -13398,20 +13378,10 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -13398,20 +13378,10 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
* 3 VOUCH Detail Voucher * * 3 VOUCH Detail Voucher *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
// +" 'G' as LINE_TYPE,"
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "; +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, ";
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME ))
...@@ -13588,16 +13558,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -13588,16 +13558,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
/** /**
* Detail MISC-Voucher 3(A) M-VOUC * * Detail MISC-Voucher 3(A) M-VOUC *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "; +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, ";
...@@ -15393,16 +15356,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15393,16 +15356,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
* Detail Voucher 4(B) VOUCH * * Detail Voucher 4(B) VOUCH *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,";// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,";// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "; +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, ";
...@@ -15576,16 +15532,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15576,16 +15532,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
* Detail MISC-Voucher 4(B) M-VOUC * * Detail MISC-Voucher 4(B) M-VOUC *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"; +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,";
...@@ -15782,16 +15731,8 @@ hdrSql = " select '' as TRAN_ID," ...@@ -15782,16 +15731,8 @@ hdrSql = " select '' as TRAN_ID,"
/*** 4C Detail Impact of Service VOUCH********/ /*** 4C Detail Impact of Service VOUCH********/
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -15970,16 +15911,9 @@ hdrSql = " select '' as TRAN_ID," ...@@ -15970,16 +15911,9 @@ hdrSql = " select '' as TRAN_ID,"
/** Detail MISC-Voucher 4(C) M-VOUC */ /** Detail MISC-Voucher 4(C) M-VOUC */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE," // -- G – Goods, S – Serice +" 'G' as LINE_TYPE," // -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"; +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,";
...@@ -16181,17 +16115,8 @@ hdrSql = " select '' as TRAN_ID," ...@@ -16181,17 +16115,8 @@ hdrSql = " select '' as TRAN_ID,"
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
// +" 'G' as LINE_TYPE,"; // +" 'G' as LINE_TYPE,";
...@@ -16369,16 +16294,8 @@ hdrSql = " select '' as TRAN_ID," ...@@ -16369,16 +16294,8 @@ hdrSql = " select '' as TRAN_ID,"
* 5(B) IMP_G Detail IMPG Received from SEZ * * 5(B) IMP_G Detail IMPG Received from SEZ *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no AS LINE_NO,"
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -18994,16 +18911,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -18994,16 +18911,9 @@ dtlSql = " select '' as TRAN_ID, "
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -19165,16 +19075,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -19165,16 +19075,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10A(2). Inter -State Supplies (Rate Wise) * * --- Detail 10A(2). Inter -State Supplies (Rate Wise) *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -19344,16 +19247,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -19344,16 +19247,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(1). advance adjustment through voucher (intra-state supply Rate-wise)* * --- Detail 10B(1). advance adjustment through voucher (intra-state supply Rate-wise)*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
// +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " // +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -19521,16 +19417,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -19521,16 +19417,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(2). advance adjustment through voucher (inter-state supply rate-wise)* * --- Detail 10B(2). advance adjustment through voucher (inter-state supply rate-wise)*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
//+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ," //+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"
...@@ -19693,16 +19582,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -19693,16 +19582,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(3). Advance adjust through payment intra-state* * --- Detail 10B(3). Advance adjust through payment intra-state*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ," +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"
...@@ -19862,16 +19744,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -19862,16 +19744,9 @@ dtlSql = " select '' as TRAN_ID, "
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -20394,16 +20269,8 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -20394,16 +20269,8 @@ dtlSql = " select '' as TRAN_ID, "
* 3 VOUCH Detail Voucher * * 3 VOUCH Detail Voucher *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -20583,16 +20450,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -20583,16 +20450,9 @@ dtlSql = " select '' as TRAN_ID, "
/** /**
* Detail MISC-Voucher 3(A) M-VOUC * * Detail MISC-Voucher 3(A) M-VOUC *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "; +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, ";
...@@ -22392,16 +22252,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22392,16 +22252,9 @@ dtlSql = " select '' as TRAN_ID, "
* Detail Voucher 4(B) VOUCH * * Detail Voucher 4(B) VOUCH *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,";// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,";// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "; +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, ";
...@@ -22577,16 +22430,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22577,16 +22430,9 @@ dtlSql = " select '' as TRAN_ID, "
* Detail MISC-Voucher 4(B) M-VOUC * * Detail MISC-Voucher 4(B) M-VOUC *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE," ;// -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"; +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,";
...@@ -22786,16 +22632,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22786,16 +22632,9 @@ dtlSql = " select '' as TRAN_ID, "
/*** 4C Detail Impact of Service VOUCH********/ /*** 4C Detail Impact of Service VOUCH********/
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -22977,16 +22816,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22977,16 +22816,9 @@ dtlSql = " select '' as TRAN_ID, "
/** Detail MISC-Voucher 4(C) M-VOUC */ /** Detail MISC-Voucher 4(C) M-VOUC */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE," // -- G – Goods, S – Serice +" 'G' as LINE_TYPE," // -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"; +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,";
...@@ -23188,16 +23020,8 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -23188,16 +23020,8 @@ dtlSql = " select '' as TRAN_ID, "
* 5(A) Detail IMPG Import of goods from SEZ * * 5(A) Detail IMPG Import of goods from SEZ *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -23379,16 +23203,8 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -23379,16 +23203,8 @@ dtlSql = " select '' as TRAN_ID, "
* 5(B) IMP_G Detail IMPG Received from SEZ * * 5(B) IMP_G Detail IMPG Received from SEZ *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql
// +" 0 as LINE_NO, " // +" 0 as LINE_NO, "
+" 'A' as STATUS, " +" 'A' as STATUS, "
+" 0 as SR_NO__OLD, " +" 0 as SR_NO__OLD, "
...@@ -26471,16 +26287,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -26471,16 +26287,9 @@ dtlSql = " select '' as TRAN_ID, "
*/ */
dtlSql =" select '' as TRAN_ID, "; dtlSql =" select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -26639,16 +26448,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -26639,16 +26448,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10A(2). Inter -State Supplies (Rate Wise) * * --- Detail 10A(2). Inter -State Supplies (Rate Wise) *
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -26814,16 +26616,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -26814,16 +26616,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(3). Advance adjust through payment intra-state* * --- Detail 10B(3). Advance adjust through payment intra-state*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ," +"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"
...@@ -26983,16 +26778,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -26983,16 +26778,9 @@ dtlSql = " select '' as TRAN_ID, "
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
+" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -27155,16 +26943,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -27155,16 +26943,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(1). advance adjustment through voucher (intra-state supply Rate-wise)* * --- Detail 10B(1). advance adjustment through voucher (intra-state supply Rate-wise)*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
// +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice // +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
// +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, " // +" case when it.item_code is null then 'S' else 'G' end as LINE_TYPE, "
...@@ -27331,16 +27112,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -27331,16 +27112,9 @@ dtlSql = " select '' as TRAN_ID, "
* --- Detail 10B(2). advance adjustment through voucher (inter-state supply rate-wise)* * --- Detail 10B(2). advance adjustment through voucher (inter-state supply rate-wise)*
*/ */
dtlSql = " select '' as TRAN_ID, "; dtlSql = " select '' as TRAN_ID, "
if ("db2".equalsIgnoreCase(CommonConstants.DB_NAME )) +" it.line_no as LINE_NO, "
{ +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
dtlSql = dtlSql +" cast(it.line_no as integer) as LINE_NO, ";
}
else
{
dtlSql = dtlSql +" to_number(trim(it.line_no)) as LINE_NO, ";
}
dtlSql = dtlSql +" 'A' as STATUS," // -- M – Modification, A – Accept D – Delete
+" 0 as SR_NO__OLD," +" 0 as SR_NO__OLD,"
+" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice +" 'G' as LINE_TYPE,"// -- G – Goods, S – Serice
//+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ," //+"case when it.item_code is null then 'S' else 'G' end as LINE_TYPE ,"
...@@ -27468,7 +27242,10 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -27468,7 +27242,10 @@ dtlSql = " select '' as TRAN_ID, "
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.setTime(date); cal.setTime(date);
int month = cal.get(Calendar.MONTH); int month = cal.get(Calendar.MONTH);
month = month - 1; //Changed By kaustubh on 2 Jan 2018 start
// month = month - 1;
month = month + 1;
//Changed By kaustubh on 2 Jan 2018 end
if(month < 10) if(month < 10)
{ {
monthStr = "0"+month; monthStr = "0"+month;
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